import { EventMapBase, NavigationState } from '@react-navigation/native'; import { ComponentProps, ComponentType, ForwardRefExoticComponent, PropsWithoutRef, ReactNode, RefAttributes } from 'react'; import { PickPartial } from '../types'; import { ScreenProps } from '../useScreens'; import { Protected } from '../views/Protected'; export declare function useFilterScreenChildren(children: ReactNode, { isCustomNavigator, contextKey, }?: { isCustomNavigator?: boolean; /** Used for sending developer hints */ contextKey?: string; }): { screens: (ScreenProps & { name: string; })[]; children: any[]; protectedScreens: Set; }; /** * Returns a navigator that automatically injects matched routes and renders nothing when there are no children. * Return type with `children` prop optional. * * Enables use of other built-in React Navigation navigators and other navigators built with the React Navigation custom navigator API. * * @param Nav - The navigator component to wrap. * @param processor - A function that processes the screens before passing them to the navigator. * @param useOnlyUserDefinedScreens - If true, all screens not specified as navigator's children will be ignored. * * @example * ```tsx app/_layout.tsx * import { ParamListBase, TabNavigationState } from "@react-navigation/native"; * import { * createMaterialTopTabNavigator, * MaterialTopTabNavigationOptions, * MaterialTopTabNavigationEventMap, * } from "@react-navigation/material-top-tabs"; * import { withLayoutContext } from "expo-router"; * * const MaterialTopTabs = createMaterialTopTabNavigator(); * * const ExpoRouterMaterialTopTabs = withLayoutContext< * MaterialTopTabNavigationOptions, * typeof MaterialTopTabs.Navigator, * TabNavigationState, * MaterialTopTabNavigationEventMap * >(MaterialTopTabs.Navigator); * export default function TabLayout() { * return ; * } * ``` */ export declare function withLayoutContext, TState extends NavigationState, TEventMap extends EventMapBase>(Nav: T, processor?: (options: ScreenProps[]) => ScreenProps[], useOnlyUserDefinedScreens?: boolean): ForwardRefExoticComponent, "children">> & RefAttributes> & { Screen: (props: ScreenProps) => null; Protected: typeof Protected; }; //# sourceMappingURL=withLayoutContext.d.ts.map