import type { ReactiveController, ReactiveControllerHost } from 'lit'; import type { Translation, WellKnownKeys } from './translation.js'; import { fallback } from './translation.js'; type FallbackType = typeof fallback; type Func = (...args: any[]) => any; type Result = Type[Key] extends Func ? ReturnType : Type[Key]; type FuncParams = Type[K] extends Func ? Parameters : []; declare function noop(): void; export declare class LocalizeController> implements ReactiveController { private host; private options; private unsubscribeDocumentLang?; private unsubscribeTranslationRegistration?; private observer?; private resolvedTranslation; constructor(host: ReactiveControllerHost & HTMLElement, options?: { onLangChange: typeof noop; }); /** * The lang of the document or element, with element taking precedence */ get lang(): string; /** * The lang of the translation being applied. * This may not match the document/element lang, in case of fallback translation */ get resolvedLang(): string; hostConnected(): void; hostDisconnected(): void; term(key: Key, ...args: FuncParams): Result; private handleLangChange; } export {};