import { MergedDictionaryOutput } from "./writeMergedDictionary.js";
import { IntlayerConfig } from "@intlayer/types/config";
import { Dictionary } from "@intlayer/types/dictionary";
import { Locale } from "@intlayer/types/allLocales";

//#region src/buildIntlayerDictionary/writeDynamicDictionary.d.ts
type DictionaryResult = {
  dictionaryPath: string;
  dictionary: Dictionary;
};
type LocalizedDictionaryResult = Partial<Record<Locale, DictionaryResult>>;
type LocalizedDictionaryOutput = Record<string, LocalizedDictionaryResult>;
/**
 * Generates the content of a dictionary entry point file.
 */
declare const generateDictionaryEntryPoint: (key: string, locales: string[], format?: "cjs" | "esm") => string;
/**
 * Write the localized dictionaries to the dictionariesDir
 * @param mergedDictionaries - The merged dictionaries
 * @param configuration - The configuration
 * @returns The final dictionaries
 *
 * @example
 * ```ts
 * const unmergedDictionaries = await writeUnmergedDictionaries(dictionaries);
 * const finalDictionaries = await writeFinalDictionaries(unmergedDictionaries);
 * console.log(finalDictionaries);
 *
 * // .intlayer/dynamic_dictionary/dictionaries/en_home.json
 * // .intlayer/dynamic_dictionary/dictionaries/fr_home.json
 * ```
 */
declare const writeDynamicDictionary: (mergedDictionaries: MergedDictionaryOutput, configuration: IntlayerConfig, formats?: ("cjs" | "esm")[]) => Promise<LocalizedDictionaryOutput>;
//#endregion
export { DictionaryResult, LocalizedDictionaryOutput, LocalizedDictionaryResult, generateDictionaryEntryPoint, writeDynamicDictionary };
//# sourceMappingURL=writeDynamicDictionary.d.ts.map