#!/usr/bin/env nu

# ANSI Color and Emoji Output Helpers
# Provides consistent formatting for user-facing messages in Phase 8 scripts
# Usage: use ansi.nu; success "Operation completed"

export def success [message: string]: nothing -> string {
  $"✅ ($message)"
}

export def error [message: string]: nothing -> string {
  $"❌ ($message)"
}

export def warning [message: string]: nothing -> string {
  $"⚠️  ($message)"
}

export def info [message: string]: nothing -> string {
  $"ℹ️  ($message)"
}

export def progress [message: string]: nothing -> string {
  $"🚀 ($message)"
}

export def working [message: string]: nothing -> string {
  $"🔧 ($message)"
}

export def validate [message: string]: nothing -> string {
  $"🔍 ($message)"
}

export def docker [message: string]: nothing -> string {
  $"🐳 ($message)"
}

export def k8s [message: string]: nothing -> string {
  $"☸️  ($message)"
}

export def template [message: string]: nothing -> string {
  $"📋 ($message)"
}

export def config [message: string]: nothing -> string {
  $"⚙️  ($message)"
}

export def print-success [message: string]: nothing -> nothing {
  print (success $message)
}

export def print-error [message: string]: nothing -> nothing {
  print (error $message)
}

export def print-warning [message: string]: nothing -> nothing {
  print (warning $message)
}

export def print-info [message: string]: nothing -> nothing {
  print (info $message)
}

export def print-progress [message: string]: nothing -> nothing {
  print (progress $message)
}

export def print-working [message: string]: nothing -> nothing {
  print (working $message)
}

export def print-validate [message: string]: nothing -> nothing {
  print (validate $message)
}

export def section [title: string]: nothing -> nothing {
  print ""
  print $"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
  print $"  ($title)"
  print $"━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
  print ""
}

export def next-step [step: string]: nothing -> nothing {
  print $"  → ($step)"
}
