import React, { ReactNode } from 'react'; import { InitializationProps } from '../methods'; import { theme as themeCreator } from '../style/theme'; import type { HeadlessFirebaseUser } from '../types/headless-types'; declare type AuthFlowContext = AuthFlowState & { authenticateApp: () => void; onChangePhoneNumber: (phoneNumber: string, { isPossiblePhoneNumber }: { isPossiblePhoneNumber: boolean; }) => void; setCodeScreenReady: (ready: boolean) => void; }; declare type UserContext = { user: null | HeadlessFirebaseUser; loading: boolean; theme?: ReturnType; }; export declare type ProviderProps = { theme?: ReturnType; children: ReactNode; onAuthStateChanged?: (user: HeadlessFirebaseUser | null) => void; /** * (Optional) The initial state of the phone number field. * If you aren't based in the US, you may want to set this to the prefix of your country. * * Default: `+1` */ initialPhoneNumber?: string; }; export declare const AuthFlowContext: React.Context; export declare const UserContext: React.Context; declare type AuthFlowState = { phoneNumber: string; /** * If true, the component shows the Verify Code Screen. */ ready: boolean; isValidPhoneNumber: boolean; }; export declare function DoormanProvider({ children, publicProjectId, onAuthStateChanged: onAuthStateChangedProp, theme, initialPhoneNumber, }: ProviderProps & InitializationProps): JSX.Element; export declare function useAuthFlowContext(): AuthFlowContext | null; export declare function useUserContext(): UserContext | null; export {};