/**
 * ZEN Console Logger
 * Centralized, styled logging for server-side output.
 * Inspired by the zen-start CLI style.
 */

const c = {
  reset:  '\x1b[0m',
  dim:    '\x1b[2m',
  bold:   '\x1b[1m',
  green:  '\x1b[32m',
  yellow: '\x1b[33m',
  red:    '\x1b[31m',
  cyan:   '\x1b[36m',
};

const out = (msg) => process.stdout.write(msg + '\n');

/** In-progress step — dim ◆ */
export const step  = (msg) => out(`  ${c.dim}◆${c.reset} ${msg}`);
/** Success — green ✓ */
export const done  = (msg) => out(`  ${c.green}✓${c.reset} ${msg}`);
/** Warning — yellow ⚠ */
export const warn  = (msg) => out(`  ${c.yellow}⚠${c.reset} ${msg}`);
/** Error / failure — red ✗ */
export const fail  = (msg) => out(`  ${c.red}✗${c.reset} ${msg}`);
/** Sub-item detail — dim · */
export const info  = (msg) => out(`    ${c.dim}·${c.reset} ${msg}`);

export const logger = { step, done, warn, fail, info };
