import { NavigationAction, NavigationState, ParamListBase, Router } from '@react-navigation/routers'; import { NavigationHelpers, PrivateValueStore } from './types'; import type { NavigationEventEmitter } from './useEventEmitter'; type Options = { id: string | undefined; onAction: (action: NavigationAction) => boolean; getState: () => State; emitter: NavigationEventEmitter; router: Router; }; /** * Navigation object with helper methods to be used by a navigator. * This object includes methods for common actions as well as methods the parent screen's navigation object. */ export default function useNavigationHelpers void>, Action extends NavigationAction, EventMap extends Record>({ id: navigatorId, onAction, getState, emitter, router, }: Options): { dispatch(action: Readonly<{ type: string; payload?: object | undefined; source?: string | undefined; target?: string | undefined; }> | ((state: Readonly<{ key: string; index: number; routeNames: string[]; history?: unknown[] | undefined; routes: (Readonly<{ key: string; name: string; path?: string | undefined; }> & Readonly<{ params?: Readonly; }> & { state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; })[]; type: string; stale: false; }>) => Readonly<{ type: string; payload?: object | undefined; source?: string | undefined; target?: string | undefined; }>)): void; navigate(...args: RouteName extends unknown ? [screen: RouteName] | [screen: RouteName, params: object | undefined] : never): void; navigate(options: RouteName_1 extends unknown ? { key: string; params?: object | undefined; merge?: boolean | undefined; } | { name: RouteName_1; key?: string | undefined; params: object | undefined; merge?: boolean | undefined; } : never): void; reset(state: Readonly<{ key: string; index: number; routeNames: string[]; history?: unknown[] | undefined; routes: (Readonly<{ key: string; name: string; path?: string | undefined; }> & Readonly<{ params?: Readonly; }> & { state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; })[]; type: string; stale: false; }> | import("@react-navigation/routers").PartialState & Readonly<{ params?: Readonly; }> & { state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; })[]; type: string; stale: false; }>>): void; goBack(): void; isFocused(): boolean; canGoBack(): boolean; getId(): string | undefined; getParent | undefined>(id?: string | undefined): T; getState(): Readonly<{ key: string; index: number; routeNames: string[]; history?: unknown[] | undefined; routes: (Readonly<{ key: string; name: string; path?: string | undefined; }> & Readonly<{ params?: Readonly; }> & { state?: Readonly | import("@react-navigation/routers").PartialState> | undefined; })[]; type: string; stale: false; }>; } & PrivateValueStore<[ParamListBase, unknown, unknown]> & import("./types").EventEmitter & { setParams(params: Partial): void; } & ActionHelpers; export {}; //# sourceMappingURL=useNavigationHelpers.d.ts.map