import { FC, PropsWithChildren } from 'react'; import { ViewSetter, ViewState, ViewType } from './types'; export type ViewContextProps = { /** /** * Replaces the top view of the stack with a new view */ replaceView: ViewSetter; /** * Add a new view to the top of the stack, note that there is always one view on the stack, it is never empty * so, clearStackAndPush can usually be used instead, unless multiple views in the stack are needed */ pushView: ViewSetter; /** * Current view at the top of the stack, or the initial view if the stack is empty */ view: ViewState; /** * Pops the current view from the stack, going back to the previous view */ goBack: () => void; /** * Stack of views currently loaded */ stack: ViewState[]; /** * Clear the stack and set the new and only view in the stack */ clearStackAndPush: ViewSetter; /** * Whether there is a previous view to go back to */ canGoBack: boolean; /** * Reset the stack to the initial view */ clearStackAndPushInitialView: () => void; }; type ViewContextProviderProps = { initialViewType: ViewType; loginViewType?: ViewType; }; export declare const ViewContext: import("react").Context; export declare const ViewContextProvider: FC>; export declare const useViewContext: () => ViewContextProps; export {};