import type { ElementType, ReactNode } from 'react'; export interface AuthenticatedProps { children: ReactNode | ReactNode[]; FallbackComponent?: ElementType; LoaderComponent?: ElementType; } /** * - `children` rendered if `flowType === FlowType.AUTHENTICATED`: valid access token and auth user are available. * - `FallbackComponent` rendered if `flowType === FlowType.ANONYMOUS`: app is unauthorized * - `Loader` renderer whenever the app can't determinate if the `flowType` is `FlowType.AUTHENTICATED` ir `FlowType.ANONYMOUS`: authorized or not. * * @category React Component * * @example * ```tsx * import React from 'react'; * import { Authenticated } from '@ackee/petrus'; * import MyLoginForm from './MyLoginForm'; * * const MyLoader = () =>
Loading...
; * * const MyComponent = () => ( * *
Private content
*
* ); * ``` */ export declare const Authenticated: ({ children, FallbackComponent, LoaderComponent }: AuthenticatedProps) => JSX.Element | null;