use bevy::prelude::*;
use clap::Subcommand;

mod console;

#[derive(Event, Debug, Subcommand)]
enum DebugEvent {
    /// Close the debug console.
    #[command(name = "close", aliases = ["close-console"])]
    CloseDebugConsole,

    /// Output a string to the console.
    #[command(name = "echo", aliases = ["print", "print-to-console"])]
    PrintToConsole { text: String },
}

pub(super) fn plugin(app: &mut App) {
    app.add_plugins(console::plugin).add_event::<DebugEvent>();
}
