import { Formatters } from "./interpolation.js"; import { Locale } from "./locale.js"; export declare class U27N { #private; readonly clients: Set; readonly formatters: Formatters; readonly updateHandlers: Set; constructor(options: U27N.Options); get locale(): Locale | null; setLocale(code: string): Promise; registerSetLocaleHook(hook: U27N.SetLocaleHook): U27N.SetLocaleHook; unregisterSetLocaleHook(hook: U27N.SetLocaleHook): void; setLocaleAuto(locales: string[]): Promise; ensureLocale(code: string): Locale; getLocale(code: string): Locale | undefined; update(): void; static detectLocale(locales: string[]): string | undefined; } export declare namespace U27N { interface Client { fetchResources(controller: U27N, locale: Locale): Promise; } interface LocaleFactory { (controller: U27N, code: string): Locale; } interface Options { clients?: Client[]; localeFactory: LocaleFactory; formatters?: Formatters; } interface UpdateHandler { (controller: U27N): void; } interface SetLocaleHook { (targetLocale: Locale): void; } }