import { Translation, TranslationEntries, PartialTranslationExtension } from '@helpwave/internationalization';
import { SingleOrArray } from '../utils/typing.js';
import { HightideTranslationLocales, HightideTranslationEntries } from './translations.js';

/**
 * Use for translations where you know that all values are ICU strings.
 *
 * This most likely is the case for Translations provided by a backend,
 * for more dynamic and typesafe translation use useTranslation instead
 */
declare function useICUTranslation<L extends string, T extends Record<string, string>>(translations: Translation<L, T>[] | Translation<L, T>, locale: L): (key: string, values?: Record<string, object>) => string;
type UseHidetideTranslationOverwrites = {
    locale?: HightideTranslationLocales;
};
type HidetideTranslationExtension<L extends string, T extends TranslationEntries> = PartialTranslationExtension<L, HightideTranslationLocales, T, HightideTranslationEntries>;
/**
 * A wrapper for the useHightideTranslation to load and specify the translations for the library
 */
declare function useHightideTranslation<L extends string, T extends TranslationEntries>(extensions?: SingleOrArray<HidetideTranslationExtension<L, T>>, overwrites?: UseHidetideTranslationOverwrites): <K extends keyof HightideTranslationEntries | keyof T>(key: K, values?: (T & HightideTranslationEntries)[K] extends (...args: infer P) => unknown ? P[0] : never) => string;

export { useHightideTranslation, useICUTranslation };
