import type { AddressFormat, AddressLevel, AddressSettings, AddressSurface, ExtraFieldDefinition, ResolvedAddressSchema } from './types.js'; /** * `lfmt` when the record has one that differs from `fmt` and the locale's * language is not the language the native layout is written in — the * record's `lang`, falling back to `languages[0]`; otherwise `fmt`. Hong * Kong lists `en` among its `languages` (an official language) but its * native layout is Chinese (`lang: 'zh'`), so an English reader gets the * Latin layout, name first; a Chinese reader keeps the native one. A record * with neither field always uses `fmt`. The same rule names regions * (`regions.ts` displayName). Ruled 2026-10-02. */ export declare function selectFormat(record: AddressFormat, locale: string): { format: string; script: 'native' | 'latin'; }; /** * Pure derivation of one country's schema from its record. `country` is * carried as given; `regionLevels` are the levels the country's provider * enumerates (those become `select` fields with `optionSource: 'regions'`). */ export declare function deriveAddressSchema(input: { country: string; record: AddressFormat; locale: string; regionLevels: AddressLevel[]; extras?: ExtraFieldDefinition[]; }): ResolvedAddressSchema; /** * The full pipeline for a country. `''` or an unknown code resolves the * DEFAULT record (an unknown code is kept as `country`, `''` stays `''`). * `locale` defaults to the runtime's; `opts.settings` to the runtime's; * `opts.applyHook === false` skips the `addressSchema` hook. */ export declare function resolveAddressSchema(country: string, locale?: string, opts?: { surface?: AddressSurface; settings?: AddressSettings; applyHook?: boolean; }): ResolvedAddressSchema; export declare function __resetDerivationCacheForTests(): void; /** Number of cached derivations; lets a test observe hits and misses. */ export declare function __derivationCacheSizeForTests(): number;