import type { NavigationProp, NavigationState } from './react-navigation/native';
import type { Href } from './types';
/**
* Returns the navigation object for the current route. Mirrors the React Navigation
* [`navigation` object](https://reactnavigation.org/docs/navigation-object). Use it to
* imperatively access layout-specific functionality like `navigation.openDrawer()` in a
* [Drawer](/router/advanced/drawer/) layout.
*
* @example
* ```tsx app/index.tsx
* import { useNavigation } from 'expo-router';
*
* export default function Route() {
* // Access the current navigation object for the current route.
* const navigation = useNavigation();
*
* return (
*
* {
* // Open the drawer view.
* navigation.openDrawer();
* }}>
* Open Drawer
*
*
* );
* }
* ```
*
* When using nested layouts, you can access higher-order layouts by passing a secondary argument denoting the layout route.
* For example, `/menu/_layout.tsx` is nested inside `/app/orders/`, you can use `useNavigation('/orders/menu/')`.
*
* @example
* ```tsx app/orders/menu/index.tsx
* import { useNavigation } from 'expo-router';
*
* export default function MenuRoute() {
* const rootLayout = useNavigation('/');
* const ordersLayout = useNavigation('/orders');
*
* // Same as the default results of `useNavigation()` when invoked in this route.
* const parentLayout = useNavigation('/orders/menu');
* }
* ```
*
* If you attempt to access a layout that doesn't exist, an error such as
* `Could not find parent navigation with route "/non-existent"` is thrown.
*
*
* @param parent Provide an absolute path such as `/(root)` to the parent route or a relative path like `../../` to the parent route.
* @returns The navigation object for the current route.
*
* @see The full navigation API is available directly from `expo-router` — no
* `@react-navigation/*` install required. For the navigator-dependent functions reference,
* see [navigation dependent functions](https://reactnavigation.org/docs/navigation-object/#navigator-dependent-functions).
*/
export declare function useNavigation, 'getState'> & {
getState(): NavigationState | undefined;
}>(parent?: string | Href): T;
//# sourceMappingURL=useNavigation.d.ts.map