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

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

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