"use strict";
/**
 * Color System
 *
 * Semantic color functions with TTY awareness
 * @module utils/ui/colors
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.dim = exports.bold = exports.gradientText = exports.color = void 0;
const types_1 = require("./types");
const init_1 = require("./init");
/**
 * Apply semantic color to text
 */
function color(text, semantic) {
    if (!types_1.moduleCache.chalk || !(0, init_1.useColors)())
        return text;
    switch (semantic) {
        case 'success':
            return types_1.moduleCache.chalk.green.bold(text);
        case 'error':
            return types_1.moduleCache.chalk.red.bold(text);
        case 'warning':
            return types_1.moduleCache.chalk.yellow(text);
        case 'info':
            return types_1.moduleCache.chalk.cyan(text);
        case 'dim':
            return types_1.moduleCache.chalk.gray(text);
        case 'primary':
            return types_1.moduleCache.chalk.hex(types_1.COLORS.primary).bold(text);
        case 'secondary':
            return types_1.moduleCache.chalk.hex(types_1.COLORS.secondary)(text);
        case 'command':
            return types_1.moduleCache.chalk.yellow.bold(text);
        case 'path':
            return types_1.moduleCache.chalk.cyan.underline(text);
        default:
            return text;
    }
}
exports.color = color;
/**
 * Apply gradient to text (for headers)
 * Uses cyan-to-blue gradient for professional look
 */
function gradientText(text) {
    if (!types_1.moduleCache.gradient || !(0, init_1.useColors)())
        return text;
    return types_1.moduleCache.gradient([types_1.COLORS.primary, types_1.COLORS.secondary])(text);
}
exports.gradientText = gradientText;
/**
 * Bold text
 */
function bold(text) {
    if (!types_1.moduleCache.chalk || !(0, init_1.useColors)())
        return text;
    return types_1.moduleCache.chalk.bold(text);
}
exports.bold = bold;
/**
 * Dim text
 */
function dim(text) {
    if (!types_1.moduleCache.chalk || !(0, init_1.useColors)())
        return text;
    return types_1.moduleCache.chalk.dim(text);
}
exports.dim = dim;
//# sourceMappingURL=colors.js.map