import * as React from 'react'; import type { NavigationAction, NavigationState, ParamListBase } from '../routers'; import type { NavigationHelpers } from './types'; export type ListenerMap = { action: ChildActionListener; focus: FocusedNavigationListener; }; export type KeyedListenerMap = { getState: GetStateListener; beforeRemove: ChildBeforeRemoveListener; }; export type AddListener = (type: T, listener: ListenerMap[T]) => void; export type AddKeyedListener = (type: T, key: string, listener: KeyedListenerMap[T]) => void; export type ChildActionListener = (action: NavigationAction, visitedNavigators?: Set) => boolean; export type FocusedNavigationCallback = (navigation: NavigationHelpers) => T; export type FocusedNavigationListener = (callback: FocusedNavigationCallback) => { handled: boolean; result: T; }; export type GetStateListener = () => NavigationState; export type ChildBeforeRemoveListener = (action: NavigationAction) => boolean; /** * Context which holds the required helpers needed to build nested navigators. */ export declare const NavigationBuilderContext: React.Context<{ onAction?: (action: NavigationAction, visitedNavigators?: Set) => boolean; addListener?: AddListener; addKeyedListener?: AddKeyedListener; onRouteFocus?: (key: string) => void; onDispatchAction: (action: NavigationAction, noop: boolean) => void; onOptionsChange: (options: object) => void; scheduleUpdate: (callback: () => void) => void; flushUpdates: () => void; stackRef?: React.MutableRefObject; }>; //# sourceMappingURL=NavigationBuilderContext.d.ts.map