import chalk from 'chalk';
import ora, { Ora } from 'ora';

export function success(message: string): void {
  console.log(chalk.green('✓'), message);
}

export function error(message: string): void {
  console.log(chalk.red('✗'), message);
}

export function info(message: string): void {
  console.log(chalk.blue('ℹ'), message);
}

export function warn(message: string): void {
  console.log(chalk.yellow('⚠'), message);
}

export function spinner(text: string): Ora {
  return ora(text).start();
}

export function printHeader(title: string): void {
  console.log();
  console.log(chalk.bold.cyan(title));
  console.log(chalk.gray('─'.repeat(title.length)));
  console.log();
}

export function printKeyValue(key: string, value: string): void {
  console.log(chalk.gray(`${key}:`), chalk.white(value));
}

export function printSection(title: string): void {
  console.log();
  console.log(chalk.bold(title));
}
