const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
let __intlayer_chokidar = require("@intlayer/chokidar");
let __intlayer_config = require("@intlayer/config");
let node_path = require("node:path");
let __intlayer_unmerged_dictionaries_entry = require("@intlayer/unmerged-dictionaries-entry");

//#region src/listContentDeclaration.ts
const listContentDeclarationRows = (options) => {
	const config = (0, __intlayer_config.getConfiguration)(options?.configOptions);
	const unmergedDictionariesRecord = (0, __intlayer_unmerged_dictionaries_entry.getUnmergedDictionaries)(config);
	return Object.values(unmergedDictionariesRecord).flat().map((dictionary) => ({
		key: dictionary.key ?? "",
		path: (0, node_path.relative)(config.content.baseDir, dictionary.filePath ?? "Remote")
	}));
};
const listContentDeclaration = (options) => {
	const appLogger = (0, __intlayer_config.getAppLogger)((0, __intlayer_config.getConfiguration)(options?.configOptions), { config: { prefix: "" } });
	const rows = listContentDeclarationRows(options);
	const lines = rows.map((r) => [
		(0, __intlayer_config.colon)(` - ${(0, __intlayer_config.colorizeKey)(r.key)}`, {
			colSize: rows.map((r$1) => r$1.key.length),
			maxSize: 60
		}),
		" - ",
		(0, __intlayer_chokidar.formatPath)(r.path)
	].join(""));
	appLogger(`Content declaration files:`);
	lines.forEach((l) => {
		appLogger(l, { level: "info" });
	});
	appLogger(`Total content declaration files: ${(0, __intlayer_config.colorizeNumber)(rows.length)}`);
};

//#endregion
exports.listContentDeclaration = listContentDeclaration;
exports.listContentDeclarationRows = listContentDeclarationRows;
//# sourceMappingURL=listContentDeclaration.cjs.map