import type { Locale } from 'use-intl'; import type { DomainConfig, DomainsConfig, LocalePrefixConfigVerbose, LocalePrefixMode, Locales, Pathnames } from '../routing/types.js'; export declare function getFirstPathnameSegment(pathname: string): string; export declare function getInternalTemplate>(pathnames: AppPathnames, pathname: string, locale: AppLocales[number]): [AppLocales[number] | undefined, keyof AppPathnames | undefined]; export declare function formatTemplatePathname(sourcePathname: string, sourceTemplate: string, targetTemplate: string, prefix?: string): string; /** * Removes potential prefixes from the pathname. */ export declare function getNormalizedPathname(pathname: string, locales: AppLocales, localePrefix: LocalePrefixConfigVerbose): string; export declare function findCaseInsensitiveString(candidate: string, strings: Array): string | undefined; export declare function getLocalePrefixes(locales: AppLocales, localePrefix: LocalePrefixConfigVerbose, sort?: boolean): Array<[AppLocales[number], string]>; export declare function getPathnameMatch(pathname: string, locales: AppLocales, localePrefix: LocalePrefixConfigVerbose, domain?: DomainConfig): { locale: AppLocales[number]; prefix: string; matchedPrefix: string; exact?: boolean; } | undefined; export declare function getRouteParams(template: string, pathname: string): Record | undefined; export declare function formatPathnameTemplate(template: string, params?: object): string; export declare function formatPathname(pathname: string, prefix: string | undefined, search: string | undefined): string; export declare function getHost(requestHeaders: Headers): string | undefined; export declare function isLocaleSupportedOnDomain(locale: Locale, domain: DomainConfig): boolean; export declare function getBestMatchingDomain(curHostDomain: DomainConfig | undefined, locale: Locale, domainsConfig: DomainsConfig): DomainConfig | undefined; export declare function applyBasePath(pathname: string, basePath: string): string; export declare function getLocaleAsPrefix(locale: AppLocales[number]): string; export declare function sanitizePathname(pathname: string): string;