import { type Accessor, type ReadableSignal } from '@nano_kit/store'; import type { TranslationData, Loader, MessagesScheme, AnyTranslationData, MessagesAccessor } from './types.js'; /** * Runtime context used by message formats. * * It owns the active locale, loads translation data, and exposes messages helpers * that bind a messages scheme to the current namespace data. * @template T - Translation data shape keyed by namespace name. */ export declare class IntlContext = AnyTranslationData> { #private; /** * Active locale accessor. * With a full-data loader, it keeps the previous locale until the translations of the next one load. */ readonly $locale: Accessor; /** * Loading state for full-data loaders. */ readonly $loading: ReadableSignal; /** * Loading error for full-data loaders. */ readonly $error: ReadableSignal; /** * Creates an internationalization context. * @param $locale - Active locale accessor. * @param loader - Messages loader bound to the active locale. */ constructor($locale: Accessor, loader: Loader); /** * Creates reactive messages for a single namespace. * @param namespace - Namespace key to read from loaded translation data. * @param scheme - Messages scheme compatible with the namespace data shape. * @returns A tuple with formatted messages, pending state, and loading error. */ messages = {}>(namespace: K, scheme?: S): readonly [MessagesAccessor, ReadableSignal, ReadableSignal]; } //# sourceMappingURL=context.d.ts.map