import React from 'react'; import { BottomTabNavigationOptions } from '@react-navigation/bottom-tabs'; import { NavigationContainerRefWithCurrent } from '@react-navigation/native'; import { DrawerNavigationOptions } from '@react-navigation/drawer'; import { TScreenData, TStackData, TTabsData, TModalData, TRootName, Layout, RootProps, ContainerLayoutKeys, TDrawersData, RootSetAs } from './types'; export declare class Navio, TabsData extends TTabsData, ModalData extends TModalData, DrawersData extends TDrawersData, TabsLayoutName extends ContainerLayoutKeys = ContainerLayoutKeys, DrawersLayoutName extends ContainerLayoutKeys = ContainerLayoutKeys, RootName extends TRootName = TRootName, RootSetAsNames extends Record = { stacks: StackName; tabs: TabsName; drawers: DrawersName; }> { static build, TabsData extends TTabsData, ModalData extends TModalData, DrawersData extends TDrawersData, TabsLayoutName extends ContainerLayoutKeys = ContainerLayoutKeys, DrawersLayoutName extends ContainerLayoutKeys = ContainerLayoutKeys, RootName extends TRootName = TRootName>(data: Layout, Record, Record, Record, Record, RootName>): Navio; private layout; private navRef; private navIsReadyRef; private tunnel; private __tabsUpdatedOptions; private __drawerUpdatedOptions; private __modalParams; constructor(data: Layout, Record, Record, Record, Record, RootName>); get N(): NavigationContainerRefWithCurrent; private get navIsReady(); private log; private __setRoot; private getSafeRoot; private getCustomDefaultOptions; protected navigate: (name: T, params?: Params | undefined) => void; /** * `push(...)` action adds a route on top of the stack and navigates forward to it. * * @param name ScreenName * @param params Params */ push(name: T, params?: Params): void; /** * `goBack()` action creator allows to go back to the previous route in history. */ goBack(): void; /** * `setParams(...)` action allows to update params for a certain route. * * @param name all available navigation keys. Leave `undefined` if applying for the focused route. * @param params object */ setParams(name: T, params: Params): void; /** * `setRoot(as, name)` action sets a new app root. * * Tips: It can be used to switch between Tabs, Drawers, and Stacks. * * @param as used to define the type of the app layout. Possible values: 'stacks' | 'tabs' | 'drawers'. * @param name will be autocompleted based on `as` value and current layout configuration. */ setRoot(as: SetAs, routeName: RouteName): void; /** * `stacks` contains navigation actions for stack-based navigators. * * Available methods: * * `push`, `pop`, `popToTop`, `setRoot` * */ get stacks(): { /** * `push(...)` action adds a route on top of the stack and navigates forward to it. * * Tips: It will "hide" tabs. * * @param name StackName */ push(name: T): void; /** * `pop(...)` action takes you back to a previous screen in the stack. * * @param count number */ pop(count?: number): void; /** * `popToPop()` action takes you back to the first screen in the stack, dismissing all the others. */ popToTop(): void; /** * `setRoot(...)` action sets a new app root from stacks. * * Tips: It can be used to switch between Auth and App stacks. * * @param name StackName */ setRoot(name: T_1): void; }; /** * `tabs` contains navigation actions for tab-based navigators. * * Available methods: * * `jumpTo`, `setRoot` * */ get tabs(): { /** * `jumpTo(...)` action can be used to jump to an existing route in the tab navigator. * * @param name TabName */ jumpTo(name: T): void; /** * `updateOptions(...)` action updates provided tab's options. * * Tips: It can be used to update badge count. * * @param name name of the tab * @param options `BottomTabNavigationOptions` options for the tab. */ updateOptions(name: T_1, options: BottomTabNavigationOptions): void; /** * `setRoot(...)` action sets a new app root from tabs. * * Tips: It can be used to switch between Auth and Tabs. * * @param name TabsName */ setRoot(name: T_2): void; }; /** * `modals` contains navigation actions for modals. * * Available methods: * * `show` * */ get modals(): { /** * `show(...)` action can be used to show an existing modal. * * @param name ModalName */ show(name: ModalName, params?: Params | undefined): void; /** * `getParams(...)` action can be used to get params passed to the modal. * * @param name ModalName */ getParams(name: ModalName): Params_1; }; /** * `drawers` contains navigation actions for drawer-based navigators. * * Available methods: * * `open`, `close`, `toggle`, `jumpTo`, `setRoot` * */ get drawers(): { /** * `open()` action can be used to open the drawer pane. */ open(): void; /** * `close()` action can be used to close the drawer pane. */ close(): void; /** * `toggle()` action can be used to open the drawer pane if closed, or close if open. */ toggle(): void; /** * `jumpTo(...)` action can be used to jump to an existing route in the drawer navigator. * * @param name StacksName */ jumpTo(name: T): void; /** * `updateOptions(...)` action updates provided drawer's options. * * @param name name of the drawer layout * @param options `DrawerNavigationOptions` options for the drawer. */ updateOptions(name: T_1, options: DrawerNavigationOptions): void; /** * `setRoot(...)` action sets a new app root from drawers. * * Tips: It can be used to switch between Auth and Drawers. * * @param name DrawersName */ setRoot(name: T_2): void; }; /** * `useN()` is the duplicate of `useNavigation()` hook from React Navigation. * */ useN(): import("@react-navigation/native").NavigationProp & Readonly<{ params: never; }> & { state?: Readonly<{ key: string; index: number; routeNames: string[]; history?: unknown[] | undefined; routes: (Readonly<{ key: string; name: string; path?: string | undefined; }> & Readonly<{ params?: Readonly; }> & any)[]; type: string; stale: false; }> | import("@react-navigation/native").PartialState & Readonly<{ params?: Readonly; }> & any)[]; type: string; stale: false; }>> | undefined; })[]; type: string; stale: false; }>, {}, {}>; /** * `useR()` is the duplicate of `useRoute()` hook from React Navigation. * */ useR(): import("@react-navigation/native").RouteProp; /** * `useParams()` is used to quickly extract params from the React Navigation route. * */ useParams(): Params; private __StackGetNavigatorProps; private __StackGetContainerOpts; private __StackGetScreens; private StackScreen; private Stack; private StackContainer; private __TabsGet; private TabScreen; private Tabs; private TabsContainer; private __DrawerGet; private DrawerScreen; private Drawer; private DrawerContainer; private __ModalGet; private ModalContainer; /** * Generates `` component for provided layout. Returns Stack Navigator. */ private Root; /** * Generates your app's root component for provided layout. * Can be used as `` */ App: React.FC>; }