import type { ReactiveController, ReactiveControllerHost } from 'lit'; import type { LoquixTranslations } from './types.js'; export type { LoquixTranslations } from './types.js'; export { en } from './translations/en.js'; /** * Replace all translation overrides at once. * * ```ts * import { setLocale } from '@aspect/loquix'; * * setLocale({ * 'chatComposer.placeholder': 'Введите сообщение...', * 'chatComposer.sendLabel': 'Отправить', * }); * ``` */ export declare function setLocale(translations: Partial): void; /** * Merge additional overrides into the current locale without * removing previously set keys. */ export declare function updateLocale(translations: Partial): void; /** Clear all overrides, reverting to the default English locale. */ export declare function resetLocale(): void; /** Return a shallow copy of the current locale overrides. */ export declare function getLocale(): Partial; /** * Reactive controller that gives a component access to the current locale. * * Subscribes to the global registry on `hostConnected` and unsubscribes * on `hostDisconnected`. Calls `host.requestUpdate()` automatically when * the locale changes. * * Usage inside a LitElement: * ```ts * private _localize = new LocalizeController(this); * * render() { * return html``; * } * ``` */ export declare class LocalizeController implements ReactiveController { private _host; constructor(host: ReactiveControllerHost); hostConnected(): void; hostDisconnected(): void; /** * Resolve a translation key with optional `{variable}` interpolation. */ term(key: keyof LoquixTranslations, values?: Record): string; } //# sourceMappingURL=index.d.ts.map