import { existsSync, mkdirSync } from "node:fs";
import { normalizePath } from "@intlayer/config";
import fg from "fast-glob";

//#region ../@intlayer/chokidar/dist/esm/createDictionaryEntryPoint/getBuiltUnmergedDictionariesPath.mjs
/**
* This function generates a list of dictionaries in the main directory
*/
const getBuiltUnmergedDictionariesPath = async (configuration) => {
	const { unmergedDictionariesDir, mainDir } = configuration.content;
	if (!existsSync(mainDir)) mkdirSync(mainDir, { recursive: true });
	return await fg(`${normalizePath(unmergedDictionariesDir)}/**/*.json`);
};

//#endregion
export { getBuiltUnmergedDictionariesPath };
//# sourceMappingURL=getBuiltUnmergedDictionariesPath.mjs.map