declare const useBroadcastChannel: (channelName: string) => { message: null; sendMessage: (msg: unknown) => void; }; interface Router { /** * Navigate to a new route. * @param url - The URL to navigate to (e.g., "/about" or "/blog/[slug]" with params) * @param options - Navigation options */ push: (url: string, options?: { revalidate?: boolean; }) => Promise; /** * Replace the current route without adding to history. * @param url - The URL to navigate to * @param options - Navigation options */ replace: (url: string, options?: { revalidate?: boolean; }) => Promise; /** * Go back in the browser history. */ back: () => void; /** * Refresh the current route data by revalidating. */ refresh: () => Promise; /** * Current pathname (e.g., "/blog/my-post") */ pathname: string; /** * Query parameters from the URL (e.g., ?id=123&name=test) * Alias for searchParams for backward compatibility */ query: Record; /** * Search parameters from the URL (e.g., ?id=123&name=test) */ searchParams: Record; /** * Dynamic route parameters (e.g., { slug: "my-post" } for /blog/[slug]) */ params: Record; } /** * Hook to access router functionality and current route information. * * Provides methods to navigate programmatically and access current route data. * * @returns Router object with navigation methods and route information * * @example * ```tsx * function MyComponent() { * const router = useRouter(); * * const handleClick = () => { * router.push("/about"); * }; * * return ( *
*

Current path: {router.pathname}

*

Params: {JSON.stringify(router.params)}

* *
* ); * } * ``` * * @example * ```tsx * // Navigate with dynamic params * router.push("/blog/my-post"); * * // Replace current route * router.replace("/login"); * * // Refresh current route data * await router.refresh(); * ``` */ declare function useRouter(): Router; export { type Router, useBroadcastChannel, useRouter };