/** * Parse a locale code into its components * Supports both underscore (en_US) and hyphen (en-US) formats * * @example * parseLocale("en_US") // { full: "en_US", language: "en", region: "US", packageName: "en-us", normalized: "en_US" } * parseLocale("en-GB") // { full: "en-GB", language: "en", region: "GB", packageName: "en-gb", normalized: "en_GB" } * parseLocale("es") // { full: "es", language: "es", region: undefined, packageName: "es", normalized: "es" } */ export declare function parseLocale(locale: string): LocaleInfo; /** * Get the fallback chain for a locale * * @example * getLocaleFallbackChain("en_US") // ["en_US", "en"] * getLocaleFallbackChain("es_MX") // ["es_MX", "es"] * getLocaleFallbackChain("en") // ["en"] */ export declare function getLocaleFallbackChain(locale: string): string[]; /** * Get the package name for a locale * * @example * getLocalePackageName("en_US") // "@mock-locale/en-us" * getLocalePackageName("es-MX") // "@mock-locale/es-mx" * getLocalePackageName("fr") // "@mock-locale/fr" */ export declare function getLocalePackageName(locale: string): string; /** * Merge locale definitions (for variant locales extending base locales) * Deeply merges variant into base, with variant taking precedence */ export declare function mergeLocales>(base: T, variant: Partial): T; /** * Utilities for parsing and working with locale codes */ export declare interface LocaleInfo { full: string language: string region?: string packageName: string normalized: string }