// Imports
import { Chalk } from "chalk";
const { redBright, greenBright, yellowBright, cyanBright, magentaBright } =
  new Chalk({ level: 2 });

// Logging
const logColor = (color, header, ...args) =>
  console.log(color(header), ...args);

export const logError = (...args) => logColor(redBright, ...args);

export const logConfirm = (...args) => logColor(greenBright, ...args);

export const logWarn = (...args) => logColor(yellowBright, ...args);

export const logInfo = (...args) => logColor(cyanBright, ...args);

export const logVerbose = (...args) => logColor(magentaBright, ...args);

export const ERR = (header, ...args) => logError(`[${header}]`, ...args);

export const OK = (header, ...args) => logConfirm(`[${header}]`, ...args);

export const WARN = (header, ...args) => logWarn(`[${header}]`, ...args);

export const INFO = (header, ...args) => logInfo(`[${header}]`, ...args);

export const VERB = (header, ...args) => logVerbose(`[${header}]`, ...args);
