#![allow(dead_code)]
//! Display functions for banners and help text

use crate::dev::{DevCommand, DevState};

/// Display welcome banner
pub fn welcome_banner(state: &DevState, hot_reload: bool) {
    println!("\n╭─────────────────────────────────────────╮");
    println!("│  Mecha10 Development Server            │");
    println!("╰─────────────────────────────────────────╯\n");
    println!("  Robot: {}", state.robot_id);
    println!("  Environment: {}", state.env_name);

    if let Some(dashboard_url) = state.dashboard_url() {
        println!("  Dashboard: {}", dashboard_url);
    }

    if hot_reload {
        println!("  Hot-Reload: Enabled (watching behaviors/ directory)");
    } else {
        println!("  Hot-Reload: Disabled");
    }

    println!();
    println!("  Press 'h' for help, 'q' to quit");
    println!("\n────────────────────────────────────────\n");
}

/// Display help menu
pub fn help() {
    println!("\n╭─────────────────────────────────────────╮");
    println!("│  Mecha10 Development Commands          │");
    println!("╰─────────────────────────────────────────╯\n");
    println!("  Core Commands:");

    for cmd in [
        DevCommand::StartSimulator,
        DevCommand::HotReload,
        DevCommand::ManageInfrastructure,
        DevCommand::LaunchTraining,
        DevCommand::ChangeEnvironment,
        DevCommand::ChangeTask,
        DevCommand::Teleoperate,
        DevCommand::ConnectRobot,
        DevCommand::GenerateComponent,
    ] {
        println!("    {}  - {}", cmd.key_binding(), cmd.help_text());
    }

    println!();
    println!("  Info Commands:");

    for cmd in [
        DevCommand::ShowStatus,
        DevCommand::ShowNodes,
        DevCommand::ViewLogs,
        DevCommand::Help,
    ] {
        println!("    {}  - {}", cmd.key_binding(), cmd.help_text());
    }

    println!();
    println!("  Exit:");
    println!("    q  - Quit");
    println!("    Ctrl+C - Quit");
    println!();
}
