import { useParams, usePathname, useRouter as useAppRouter, useSearchParams } from 'next/navigation';
import { NextRouter } from 'next/router';
import { PropsWithChildren } from 'react';
import { Theme } from 'theme-ui';
import { ButtonOrLinkProps } from '../atoms/ButtonOrLink';
import { GDSContextValue } from './GDSContext';
export type GDSProviderProps = PropsWithChildren<{
    /**
     * Next.js's router config, that is:
     * - In the pages router, the `NextRouter` instance returned from `useRouter()`
     * - In the app router, an object containing the following:
     *   - `useRouter` imported from `next/router`
     *   - `usePathname` imported from `next/navigation`
     *   - `useParams` imported from `next/navigation`
     *   - `useSearchParams` imported from `next/navigation`
     *   - `basePath`, if specified in the Next config
     * If we are not in a Next app, this should be set to `null` (e.g. in Storybook or tests).
     */
    clientRouter: NextRouter | {
        useRouter: typeof useAppRouter;
        usePathname: typeof usePathname;
        useParams: typeof useParams;
        useSearchParams: typeof useSearchParams;
        basePath?: string;
    } | null;
    /**
     * Next.js's link (`next/link`) or a compatible equivalent (must accept the same props, and be `ForwardRefExoticComponent`).
     * If we are not in a Next app, this should be set to `null` (e.g. in Storybook or tests), in which case it will default
     * to a mock implementation that renders a basic `<a>`.
     */
    clientLink: GDSContextValue['clientLink'] | null;
    /**
     * A function that transforms the props passed to `ButtonOrLink` components.
     * Useful to detect external links and make them open in new tabs by default, for example.
     * @deprecated Use `<ButtonOrLink.Config mapProps={...}>` instead.
     */
    mapButtonOrLinkProps?: <T extends Omit<ButtonOrLinkProps, 'children'>>(props: T) => T;
    /**
     * Whether the app should use Theme UI. Accepts a boolean or a config object with `useLegacyTheme` and `extendTheme` props:
     * - `useLegacyTheme`: Whether to use the legacy Theme UI theme. Defaults to `false`.
     * - `extendTheme`: Theme UI theme object to merge into the theme that components use, to override or add some values.
     * Defaults to `false`, meaning only Tailwind CSS is used (which is preferred, but many components still require Theme UI).
     * TODO: Remove this prop when all apps have it set to `false`.
     */
    useThemeUI?: boolean | {
        useLegacyTheme?: boolean;
        extendTheme?: Theme;
    };
}>;
/**
 * Initializes and provides global context values that some GDS components need.
 * Should be placed near the root of the app.
 */
export declare const GDSProvider: ({ clientRouter, clientLink: passedClientLink, mapButtonOrLinkProps, useThemeUI, children, }: GDSProviderProps) => import("react/jsx-runtime").JSX.Element;
export declare const MockClientLink: GDSContextValue['clientLink'];
//# sourceMappingURL=GDSProvider.d.ts.map