/**
 * @fileoverview OrdoJS CLI - Logger utility
 */

import chalk from 'chalk';

/**
 * Logger utility for CLI output
 */
export const logger = {
  /**
   * Log an informational message
   */
  info(message: string): void {
    console.log(chalk.blue('info') + ' ' + message);
  },

  /**
   * Log a success message
   */
  success(message: string): void {
    console.log(chalk.green('success') + ' ' + message);
  },

  /**
   * Log a warning message
   */
  warn(message: string): void {
    console.log(chalk.yellow('warn') + ' ' + message);
  },

  /**
   * Log an error message
   */
  error(message: string): void {
    console.error(chalk.red('error') + ' ' + message);
  },

  /**
   * Log a debug message (only in debug mode)
   */
  debug(message: string): void {
    if (process.env.DEBUG) {
      console.log(chalk.gray('debug') + ' ' + message);
    }
  }
};
