#![feature(iter_collect_into)]
use bevy::prelude::*;
use bevy_skein::SkeinPlugin;
use bevy_ui_text_input::TextInputPlugin;
use clap::ValueEnum;

mod camera;
mod cleanup;
mod debug;
mod game;
mod menus;

#[derive(States, Default, Debug, Clone, PartialEq, Eq, Hash, Reflect, ValueEnum)]
#[allow(unused)]
enum AppState {
    #[default]
    Menus,
    Ingame,
    PostGame,
}

fn main() {
    App::new()
        .register_type::<TPCTarget>()
        .add_systems(Startup, camera::setup)
        .add_plugins((DefaultPlugins, TextInputPlugin))
        .add_plugins((game::plugin, menus::plugin, debug::plugin))
        .add_plugins(SkeinPlugin::default())
        .init_state::<AppState>()
        .register_type::<AppState>()
        .run();
}

#[derive(Debug, Reflect, Component)]
#[reflect(Component)]
struct TPCTarget;
