import type { AnchorHTMLAttributes, ReactNode } from 'react';
interface RouterCtx {
pathname: string;
/** Current query string, `location.search`-style (`''`, or starting with `?`). */
search: string;
push(to: string): void;
replace(to: string): void;
back(): void;
}
declare const Ctx: import("react").Context;
declare const ParamsCtx: import("react").Context>;
export interface LinkProps extends Omit, 'href'> {
href: string;
replace?: boolean;
children?: ReactNode;
}
export declare function Link({ href, replace, children, onClick, ...rest }: LinkProps): import("react").JSX.Element;
export declare function useRouter(): RouterCtx;
export declare function usePathname(): string;
/**
* The current location's query string as a `URLSearchParams` — reactive to
* every navigation (`push`/`replace`/popstate/`` clicks). Returns a
* stable reference across renders while the underlying query string is
* unchanged.
*/
export declare function useSearchParams(): URLSearchParams;
/**
* Dynamic-segment params for the currently matched route (e.g. `:slug`).
* Catch-all (`[...slug]`) and optional catch-all (`[[...slug]]`) segments
* expose a `string[]`; an unmatched optional catch-all is left unset.
* Populated by ``; returns `{}` outside of a matched dynamic route.
*/
export declare function useParams(): Record;
export { Ctx as RouterContext, ParamsCtx as ParamsContext };
//# sourceMappingURL=router.d.ts.map