import type { PropsWithChildren } from 'react';
import type { AndroidInitialProps } from '../../initial-props';
import { InitialPropsContext } from '../../initial-props/context';
import { VisibilityProvider } from '../../visibility';

export function App({ children, ...initialProps }: PropsWithChildren<AndroidInitialProps>) {
  return (
    <InitialPropsContext.Provider value={initialProps}>
      <VisibilityProvider isVisible={true}>{children}</VisibilityProvider>
    </InitialPropsContext.Provider>
  );
}
