import type { ReactChild, ReactText } from 'react';
type TranslationTemplate = string | Record<Intl.LDMLPluralRule, string>;
/** * Interface for advanced translation options, like plural forms. */
export interface TranslationOptions {
    /**
     * Value that determines which plural form will be chosen during translation.
     * @default 0
     */
    count?: number;
    /** Discriminator for pluralization type: 'cardinal' or 'ordinal'. */
    pluralType?: Intl.PluralRuleType;
}
/**
 * Function that takes translation key with optional tokens and translation options to drive the translation process.
 * Returns translated string with tokens inserted at defined slots.
 */
export interface TranslationFunction<T extends Record<string, TranslationTemplate>> {
    (literal: keyof T): string;
    (literal: keyof T, tokens: ReactText[], options?: TranslationOptions): string;
    (literal: keyof T, tokens: ReactChild[], options?: TranslationOptions): JSX.Element[];
}
/**
 * Function returns a function capable to translate tokens based on given translation pack and given locale.
 * The passed translation object should be correlated to given locale.
 * @param translation a translation pack (might be default or completely/partially overridden).
 * @param locale locale as BCP 47 language tag. Used for pluralization rules.
 */
declare const translatorFor: <T extends Record<string, TranslationTemplate>>(translation: T, locale: string) => TranslationFunction<T>;
export default translatorFor;
//# sourceMappingURL=translate.d.ts.map