// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import React, { useEffect } from 'react';
import classNames from 'classnames';
import { AppViewType } from '../state/ducks/app';
import { Inbox } from './Inbox';
import { Install } from './Install';
import { StandaloneRegistration } from './StandaloneRegistration';
import { ThemeType } from '../types/Util';
import { usePageVisibility } from '../util/hooks';
export type PropsType = {
appView: AppViewType;
hasInitialLoadCompleted: boolean;
renderCallManager: () => JSX.Element;
renderGlobalModalContainer: () => JSX.Element;
theme: ThemeType;
};
export const App = ({
appView,
hasInitialLoadCompleted,
renderCallManager,
renderGlobalModalContainer,
theme,
}: PropsType): JSX.Element => {
let contents;
if (appView === AppViewType.Installer) {
contents =