//! Game-specific editor panel registration (no dependency on the `editor` crate).
//!
//! The in-process editor binary wraps these setups as [`EditorPlugin`] implementations
//! via `editor::register_game_editor_plugins`.

use bevy::prelude::*;

/// Bevy `App` hook registered by the editor at startup.
pub type EditorPanelSetup = fn(&mut App);

/// Panel hooks exported by the game crate for ADR 0007 dogfood.
pub fn editor_panel_setups() -> &'static [EditorPanelSetup] {
    &[register_fps_demo_panel]
}

/// Actor inspector section ids implemented in `editor::ext::game_inspector`.
pub fn actor_inspector_section_ids() -> &'static [&'static str] {
    &["game.fps_weapon_stats"]
}

/// Demo game panel state — UI is rendered by the editor adapter.
#[derive(Resource, Default, Debug)]
pub struct FpsDemoPanelState {
    pub open: bool,
    pub headline: String,
}

fn register_fps_demo_panel(app: &mut App) {
    app.init_resource::<FpsDemoPanelState>();
}
