import { MessageFormatElement } from '@formatjs/icu-messageformat-parser';
import { CustomHandler } from '../context';
/**
 * The expected shape of the fully resolved messages object.
 * Typescript ensures any static imports are properly typed, but since this
 * depends on types from formatjs, it should not be included in any files that
 * need to support older versions of TypeScript (3.7 and up).
 */
export interface I18nMessages {
    [namespace: string]: {
        [locale: string]: {
            [component: string]: {
                [key: string]: string | MessageFormatElement[];
            };
        };
    };
}
/**
 * A stateful container for formatting internal strings. Caches formatters
 * where possible; a new instance must be created if locale or messages may
 * have changed.
 */
export declare class I18nFormatter {
    private _locale;
    private _messages;
    private _localeFormatterCache;
    constructor(locale: string, messages: I18nMessages);
    format<ReturnValue, FormatFnArgs extends Record<string, string | number>>(namespace: string, component: string, key: string, provided: ReturnValue, customHandler?: CustomHandler<ReturnValue, FormatFnArgs>): ReturnValue;
}
//# sourceMappingURL=i18n-formatter.d.ts.map