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

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

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