import React from "react"; import { PathMatch } from "react-router-dom"; export interface RouteInfo { id: string; app: string; view: string; action: string; title: string; /** Whether this route should be used for navigation in the router context */ navigation: boolean; path: string; page: string; } export type RouterParams = Record; export type RouterQuery = string | URLSearchParams | string[][] | Record; interface RouterContext { routes: RouteInfo[]; getCurrent(): { route: RouteInfo; match: PathMatch; } | undefined; getRoute(reverse: string): RouteInfo | undefined; setCustomRoutes(routes: RouteInfo[]): void; navigate(route?: number | string | RouteInfo, options?: { params?: RouterParams; query?: RouterQuery; replace?: boolean; }): void; } declare const RouterContext: React.Context; export declare const useRouter: () => RouterContext; export declare const RouterContextProvider: React.FC>; export default RouterContext;