import { TranslationOptions } from './types';
import { LocaleDescriptor, TranslationResponse } from './services';
import { IKosDataModel, IKosIdentifiable, KosContext, KosCreationContext } from '../../../core';

export declare const MODEL_TYPE = "translation-model";
interface ResolveTranslationOptionsBase<T = string> {
    context?: string;
    defaultValue?: T;
}
interface ResolveTranslationsDataOptions<T = string> extends ResolveTranslationOptionsBase<T> {
    data: Record<string, any> | string;
}
type ResolveTranslationsOptionsMap<T = string> = ResolveTranslationOptionsBase<T> & Record<string, string | number | boolean | undefined | null>;
export type ResolveTranslationOptions<T = string> = ResolveTranslationsDataOptions<T> | ResolveTranslationsOptionsMap<T>;
export type TranslationModel = Exclude<TranslationModelImpl, keyof IKosDataModel>;
export declare const expandMacros: (text: string, data: Record<string, any>) => any;
export declare const replaceText: (text: string, data: Record<string, any>, context?: Record<string, any>) => any;
export declare class TranslationModelImpl implements IKosDataModel, IKosIdentifiable {
    id: string;
    namespace: string;
    descriptor: Record<string, LocaleDescriptor>;
    defaultLocale: string;
    currentLocale: string;
    bundleResolver?: (namespace: string, locale: string, context?: KosContext) => Promise<TranslationResponse>;
    private data;
    private logger;
    private resolver;
    private disposer?;
    private context;
    private rootUrl?;
    constructor(modelId: string, options: TranslationOptions, context: KosCreationContext);
    getTranslationLocales(locale: string): string[];
    private loadTranslations;
    init(): Promise<void>;
    exists(_key: string): any;
    resolveKey<T = string>(_key: string, options?: ResolveTranslationOptions<T> | string): any;
    unload(): void;
    load(): Promise<void>;
    ready(): Promise<void>;
}
export {};
//# sourceMappingURL=translation-model.d.ts.map