import type { NonEmptyRecord, Split, ValueOf } from './types'; export interface PathParamOptions { basePath?: string; matchTrailingSlash?: boolean; } export interface RouteOptionParams extends PathParamOptions { routeProps?: { [k: string]: any; }; overridePathParams?: boolean; } type ExtractPathParams> = Parts extends [ infer Head, ...infer Tail ] ? Head extends `:${infer Name}` ? { [N in Name]: string; } & ExtractPathParams : ExtractPathParams : unknown; export type Route = { path: Path; fn: (params: NonEmptyRecord>) => JSX.Element; }; export type Routes = { [P in Path]: (params: NonEmptyRecord>) => JSX.Element; } | Route[]; export declare function useRoutes(routes: Routes, { basePath, routeProps, overridePathParams, matchTrailingSlash, }?: RouteOptionParams): JSX.Element | null; export declare function usePathParams(route: Path, options?: PathParamOptions): NonEmptyRecord> | null; export declare function usePathParams(routes: ReadonlyArray, options?: PathParamOptions): ValueOf<{ [P in (typeof routes)[number]]: [ P, NonEmptyRecord> ]; }> | [null, null]; export declare function useMatch(routes: string | string[], options?: PathParamOptions): string | null; export declare function setPath(path: string): void; export {};