const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
const require_logger = require('./config/dist/esm/logger.cjs');
let node_fs = require("node:fs");

//#region ../@intlayer/cli/dist/esm/chokidar/dist/esm/cleanOutputDir.mjs
const cleanOutputDir = (configuration) => {
	const { dictionariesDir, unmergedDictionariesDir, dynamicDictionariesDir, mainDir, typesDir, configDir } = configuration.content;
	const appLogger = require_logger.getAppLogger(configuration);
	if ((0, node_fs.existsSync)(dictionariesDir)) (0, node_fs.rmSync)(dictionariesDir, { recursive: true });
	if ((0, node_fs.existsSync)(unmergedDictionariesDir)) (0, node_fs.rmSync)(unmergedDictionariesDir, { recursive: true });
	if ((0, node_fs.existsSync)(dynamicDictionariesDir)) (0, node_fs.rmSync)(dynamicDictionariesDir, { recursive: true });
	if ((0, node_fs.existsSync)(mainDir)) (0, node_fs.rmSync)(mainDir, { recursive: true });
	if ((0, node_fs.existsSync)(typesDir)) (0, node_fs.rmSync)(typesDir, { recursive: true });
	if ((0, node_fs.existsSync)(configDir)) (0, node_fs.rmSync)(configDir, { recursive: true });
	appLogger("Output directory cleaned", { isVerbose: true });
};

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