import type { ParsedUrlQueryInput } from 'node:querystring'; import type { UrlObject } from 'url'; import type { Locale } from 'use-intl'; import type { ResolvedRoutingConfig } from '../../routing/config.js'; import type { DomainsConfig, LocalePrefixMode, Locales, Pathnames } from '../../routing/types.js'; import type StrictParams from './StrictParams.js'; type SearchParamValue = ParsedUrlQueryInput[keyof ParsedUrlQueryInput]; type HrefOrHrefWithParamsImpl = Pathname extends `${string}[[...${string}` ? Pathname | ({ pathname: Pathname; params?: StrictParams; } & Other) : Pathname extends `${string}[${string}` ? // Required catch-all & regular params { pathname: Pathname; params: StrictParams; } & Other : // No params Pathname | ({ pathname: Pathname; } & Other); export type HrefOrUrlObjectWithParams = HrefOrHrefWithParamsImpl>; export type QueryParams = Record; export type HrefOrHrefWithParams = HrefOrHrefWithParamsImpl; export declare function normalizeNameOrNameWithParams(href: HrefOrHrefWithParams | { locale: Locale; href: HrefOrHrefWithParams; }): { pathname: Pathname; params?: StrictParams; }; export declare function serializeSearchParams(searchParams: Record): string; type StrictUrlObject = Omit & { pathname: Pathname; }; export declare function compileLocalizedPathname(opts: { locale: AppLocales[number]; pathname: Pathname; params?: StrictParams; pathnames: Pathnames; query?: Record; }): string; export declare function compileLocalizedPathname(opts: { locale: AppLocales[number]; pathname: StrictUrlObject; params?: StrictParams; pathnames: Pathnames; query?: Record; }): UrlObject; export declare function getRoute(locale: AppLocales[number], pathname: string, pathnames: Pathnames): keyof Pathnames; export declare function getBasePath(pathname: string, windowPathname?: string): string; export declare function applyPathnamePrefix | undefined, AppDomains extends DomainsConfig | undefined>(pathname: string, locale: Locales[number], routing: Pick, 'localePrefix' | 'domains'> & Partial, 'defaultLocale'>>, force?: boolean): string; export declare function validateReceivedConfig | undefined, AppDomains extends DomainsConfig | undefined>(config: Partial, 'defaultLocale' | 'localePrefix'>>): void; export {};