import * as react from 'react';
import { AnchorHTMLAttributes, ElementType, ReactNode } from 'react';
import * as react_jsx_runtime from 'react/jsx-runtime';

interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
    to: string;
}
interface RouterAdapter {
    currentPath: string;
    currentSearch?: string;
    navigate: (to: string) => void;
    Link: ElementType<LinkProps>;
}
declare function useRouterContext(): RouterAdapter;
declare function RouterProvider({ value, children }: {
    value: RouterAdapter;
    children: ReactNode;
}): react.FunctionComponentElement<react.ProviderProps<RouterAdapter | null>>;

/**
 * Bridge component that reads TanStack Router state and provides it
 * via the generic RouterContext. Place inside TanStack's RouterProvider.
 *
 * Uses useMemo to stabilize the adapter value and prevent unnecessary
 * re-renders in downstream components.
 */
declare function TanStackRouterBridge({ children }: {
    children: ReactNode;
}): react_jsx_runtime.JSX.Element;

/**
 * Resets scroll position to the top of the nearest scrollable ancestor on every
 * route change. Needed because the `@repo/ui` AppShell wraps content in an inner
 * scroll container (`AppShellRightSideOuterContainer`), so TanStack Router's
 * window-level `scrollRestoration` option has no effect.
 *
 * Place this component directly inside the app shell's content area, above
 * `<Outlet />`.
 */
declare function ScrollToTop(): react_jsx_runtime.JSX.Element;

export { RouterProvider, ScrollToTop, TanStackRouterBridge, useRouterContext };
export type { LinkProps, RouterAdapter };
