const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
const require_normalizePath = require('../../../../config/dist/esm/utils/normalizePath.cjs');
let node_fs = require("node:fs");
let fast_glob = require("fast-glob");
fast_glob = require_rolldown_runtime.__toESM(fast_glob);

//#region ../@intlayer/chokidar/dist/esm/createDictionaryEntryPoint/getBuiltDynamicDictionariesPath.mjs
/**
* This function generates a list of dictionaries in the main directory
*/
const getBuiltDynamicDictionariesPath = async (configuration, format = "esm") => {
	const { dynamicDictionariesDir, mainDir } = configuration.content;
	if (!(0, node_fs.existsSync)(mainDir)) (0, node_fs.mkdirSync)(mainDir, { recursive: true });
	const extension = format === "cjs" ? "cjs" : "mjs";
	return await (0, fast_glob.default)(`${require_normalizePath.normalizePath(dynamicDictionariesDir)}/**/*.${extension}`);
};

//#endregion
exports.getBuiltDynamicDictionariesPath = getBuiltDynamicDictionariesPath;
//# sourceMappingURL=getBuiltDynamicDictionariesPath.cjs.map