"""Colored terminal output for ASA CLI v2."""

import sys

# ANSI color codes
GREEN = "\033[32m"
RED = "\033[31m"
YELLOW = "\033[33m"
BLUE = "\033[34m"
CYAN = "\033[36m"
BOLD = "\033[1m"
DIM = "\033[2m"
RESET = "\033[0m"


def success(message: str) -> None:
    """Print success message (green ✅)."""
    print(f"{GREEN}✅ {message}{RESET}")


def error(message: str) -> None:
    """Print error message (red ❌) to stderr."""
    print(f"{RED}❌ {message}{RESET}", file=sys.stderr)


def warning(message: str) -> None:
    """Print warning message (yellow ⚠️)."""
    print(f"{YELLOW}⚠️  {message}{RESET}")


def info(message: str) -> None:
    """Print info message (blue)."""
    print(f"{BLUE}{message}{RESET}")


def detail(message: str) -> None:
    """Print detail/indented message (dim)."""
    print(f"{DIM}   {message}{RESET}")


def header(message: str) -> None:
    """Print header message (bold cyan)."""
    print(f"\n{BOLD}{CYAN}{message}{RESET}")


def lint_pass(message: str) -> None:
    """Print lint pass message."""
    print(f"{GREEN}✅ [LINT PASS] {message}{RESET}")


def lint_fail(message: str) -> None:
    """Print lint fail message to stderr."""
    print(f"{RED}❌ [LINT FAIL] {message}{RESET}", file=sys.stderr)


def lint_warn(message: str) -> None:
    """Print lint warning message."""
    print(f"{YELLOW}⚠️  [LINT WARN] {message}{RESET}")
