import { g as resolveComma, y as toArray } from "./main-B3qcLRNf.js";
import { n as enable, r as namespaces, t as createDebug } from "./node-Ba_UB_xO.js";

//#region ../../node_modules/.pnpm/tsdown@0.21.0-beta.2_@arethetypeswrong+core@0.18.2_@typescript+native-preview@7.0.0-dev_d0d0ed2124937ee9dd401a280008a3bf/node_modules/tsdown/dist/debug-BUVkFfEZ.mjs
const debugLog = createDebug("tsdown:debug");
function enableDebug(debug) {
	if (!debug) return;
	let namespace;
	if (debug === true) namespace = "tsdown:*";
	else namespace = resolveComma(toArray(debug)).map((v) => `tsdown:${v}`).join(",");
	const ns = namespaces();
	if (ns) namespace += `,${ns}`;
	enable(namespace);
	debugLog("Debugging enabled", namespace);
}

//#endregion
export { enableDebug as t };