"use strict";
/* Socket Lib - Built with rolldown */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../_virtual/_rolldown/runtime.js');
const require_primordials_string = require('../primordials/string.js');
const require_logger_colors = require('./colors.js');
let src_external__socketregistry_is_unicode_supported = require("../external/@socketregistry/is-unicode-supported");
src_external__socketregistry_is_unicode_supported = require_runtime.__toESM(src_external__socketregistry_is_unicode_supported);

//#region src/logger/symbols-builder.ts
/**
* @file Free-function helpers for per-instance log-symbol construction + symbol
*   stripping. Extracted from `logger/node.ts` (the `Logger` class) so the
*   class stays under the 1000-line hard cap and so other callers (alt loggers,
*   format helpers) can reuse the same logic without instantiating a `Logger`.
*
*   - `buildLoggerSymbols` — theme + unicode-detection → `LogSymbols` map
*   - `stripLoggerSymbols` — strip leading status emoji from a string
*/
/**
* Build a `LogSymbols` map for the given theme.
*
* On unicode-supporting terminals returns the canonical icons (`✔`, `✖`, `⚠`,
* `ℹ`, `→`, `∴`, `↻`); otherwise returns ASCII fallbacks (`√`, `×`, `‼`, `i`,
* `>`, `:.`, `@`). Colors are pulled from the supplied theme via `applyColor`.
*/
function buildLoggerSymbols(theme) {
	const supported = (0, src_external__socketregistry_is_unicode_supported.default)();
	const colors = /* @__PURE__ */ require_logger_colors.getYoctocolors();
	/* c8 ignore start - ASCII-fallback symbol arms only fire on
	terminals without unicode support; tests run on unicode TTYs. */
	return {
		__proto__: null,
		fail: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "✖" : "×", theme.colors.error, colors),
		info: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "ℹ" : "i", theme.colors.info, colors),
		progress: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "∴" : ":.", theme.colors.step, colors),
		skip: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "↻" : "@", theme.colors.step, colors),
		step: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "→" : ">", theme.colors.step, colors),
		success: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "✔" : "√", theme.colors.success, colors),
		warn: /* @__PURE__ */ require_logger_colors.applyColor(supported ? "⚠" : "‼", theme.colors.warning, colors)
	};
	/* c8 ignore stop */
}
/**
* Strip leading log-status symbols (and variation selectors) from a string.
* Matches both unicode forms (`✖`, `⚠`, `✔`, `ℹ`, `→`, `∴`, `↻`) and the
* unambiguous ASCII fallback `:.`. Does not strip lone ASCII letters (`i`, `>`,
* `@`) since those would mangle real words.
*
* Handles the trailing variation-selector U+FE0F + whitespace so a `'✔ Done'`
* input becomes `'Done'`.
*/
function stripLoggerSymbols(text) {
	return require_primordials_string.StringPrototypeReplace(text, /^(?:[✖✗×⚠‼✔✓√ℹ→∴↻]|:.)[️\s]*/u, "");
}

//#endregion
exports.buildLoggerSymbols = buildLoggerSymbols;
exports.stripLoggerSymbols = stripLoggerSymbols;