import type { CustomTranslations, Locale, Translations } from '../../translations';
import { SupportedLocales } from './types';
/**
 * Convert to ISO 639-1
 */
export declare const toTwoLetterCode: (locale: string) => string;
/**
 * Matches a string with one of the locales
 * @param locale -
 * @param supportedLocales -

 * @example
 * matchLocale('en-GB');
 * // 'en-US'
 */
export declare function matchLocale(locale: string, supportedLocales: Locale[]): Locale | null;
/**
 * Returns a locale with the proper format
 * @param locale -
 *
 * @example
 * formatLocale('En_us');
 * // 'en-US'
 */
export declare function formatLocale(locale: string): Locale | null;
/**
 * Checks the locale format.
 * Also checks if it's on the locales array.
 * If it is not, tries to match it with one.
 * @param locale -
 * @param supportedLocales -
 */
export declare function parseLocale(locale: string, supportedLocales: Locale[]): Locale | null;
/**
 * Formats the locales inside the customTranslations object against the supportedLocales
 * @param customTranslations -
 * @param supportedLocales -
 */
export declare function formatCustomTranslations(customTranslations: CustomTranslations | undefined, supportedLocales: Locale[]): CustomTranslations;
/**
 * Returns an array with all the locales
 * @param locale - The locale the user wants to use
 * @param fetchTranslationFromCdnPromise -
 * @param customTranslations -
 */
export declare const loadTranslations: (locale: string, fetchTranslationFromCdnPromise: (locale: SupportedLocales) => Promise<any>, customTranslations?: CustomTranslations) => Promise<Translations>;
/**
 * Injects JSX elements in a middle of a translation and returns a JSX array
 * The input string should use %# as the token to know where to insert the component
 * @param translation - Translation string
 * @param renderFunctions - An array function that renders JSX elements
 */
export declare const interpolateElement: <Element = unknown>(translation: string, renderFunctions: Array<(translation: string) => Element>) => (string | Element | undefined)[];
//# sourceMappingURL=utils.d.ts.map