import type { FtMessageContext } from "@fluid-topics/public-api"; import { FtServiceWithCache } from "./FtServiceWithCache"; declare global { interface Window { FluidTopicsI18nService?: FtI18nService; FluidTopicsCustomI18nService?: FtI18nService; } } export type Unsubscribe = () => void; type I18nContextLoadedEventDetails = { loadedContexts: string[]; }; export declare class I18nContextLoadedEvent extends CustomEvent { constructor(detail: I18nContextLoadedEventDetails); } export declare const clearAfterUnitTest: unique symbol; declare const FtI18nServiceInternalClass_base: typeof FtServiceWithCache & import("@fluid-topics/ft-wc-utils").Constructor; export declare class FtI18nServiceInternalClass extends FtI18nServiceInternalClass_base { private messageContextProvider; private defaultMessages; private listeners; private currentUiLocale; constructor(messageContextProvider: (locale: string, name: string) => Promise); [clearAfterUnitTest]: () => void; private clearWhenUiLocaleChanges; /** * ⚠️ Only use in GWT or unit test contexts * @param context */ addContext(context: FtMessageContext): void; getAllContexts(): Array; prepareContext(name: string, defaultMessages?: Record): Promise; private resolveContext; resolveRawMessage(contextName: string, messageKey: string): string; resolveMessage(contextName: string, message: string, ...args: any[]): string; private fetchContext; subscribe(contextName: string, callback: Function): Unsubscribe; private notifyAll; private notify; } export type FtI18nService = FtI18nServiceInternalClass; export declare const ftI18nService: FtI18nService; export declare const ftCustomI18nService: FtI18nService; export {};