"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.error = exports.warning = exports.success = exports.info = void 0;
exports.logRed = logRed;
exports.logGreen = logGreen;
exports.logYellow = logYellow;
exports.logMagenta = logMagenta;
/* eslint-disable no-console */
const RESET = "\x1b[0m";
const RED = "\x1b[31m";
const GREEN = "\x1b[32m";
const YELLOW = "\x1b[33m";
const MAGENTA = "\x1b[35m";
const QUIET = process.env.NODE_ENV === "test";
/**
 * Print red text to the console (fancy)
 * @param args log arguments
 */
function logRed({ quiet = QUIET, text }) {
    if (!quiet) {
        console.log(RED + text + RESET);
    }
}
/**
 * Print green text to the console (fancy)
 * @param args log arguments
 */
function logGreen({ quiet = QUIET, text }) {
    if (!quiet) {
        console.log(GREEN + text + RESET);
    }
}
/**
 * Print yellow text to the console (fancy)
 * @param args log arguments
 */
function logYellow({ quiet = QUIET, text }) {
    if (!quiet) {
        console.log(YELLOW + text + RESET);
    }
}
/**
 * Print magenta text to the console (fancy)
 * @param args log arguments
 */
function logMagenta({ quiet = QUIET, text }) {
    if (!quiet) {
        console.log(MAGENTA + text + RESET);
    }
}
/**
 * create an info message
 * @param text - the text to print
 * @returns the text with a prefix
 */
const info = (text) => `[i] ${text}`;
exports.info = info;
/**
 * create a success message
 * @param text - the text to print
 * @returns the text with a prefix
 */
const success = (text) => `[✓] ${text}`;
exports.success = success;
/**
 * create a success message
 * @param text - the text to print
 * @returns the text with a prefix
 */
const warning = (text) => `[!] ${text}`;
exports.warning = warning;
/**
 * create an error message
 * @param text - the text to print
 * @returns the text with a prefix
 */
const error = (text) => `[✗] ${text}`;
exports.error = error;
//# sourceMappingURL=logger.js.map