pub mod inspector;
pub mod inspector_camera;
pub mod inspector_light;
pub mod inspector_lines;
pub mod inspector_material;
pub mod inspector_mesh;
pub mod inspector_name;
pub mod inspector_render_layer;
pub mod inspector_text;
pub mod inspector_transform;
pub mod tree;

pub use inspector::*;
pub use tree::*;

use nightshade::ecs::gizmos::{GizmoDragMode, GizmoMode, GizmoState};
use nightshade::ecs::prefab::Prefab;
use nightshade::prelude::*;

pub struct PrefabMetadata {
    pub prefab: Prefab,
    pub source_path: Option<String>,
}

pub struct EditorContext {
    pub show_left_panel: bool,
    pub show_right_panel: bool,
    pub selected_entity: Option<Entity>,
    pub grayscale_enabled: bool,
    pub prefabs: Vec<PrefabMetadata>,
    pub hovered_file_path: Option<std::path::PathBuf>,
    pub drag_file_type: Option<String>,
    pub gizmo: Option<GizmoState>,
    pub gizmo_mode: GizmoMode,
    pub hover_axis: Option<Vec3>,
    pub drag_mode: GizmoDragMode,
    pub camera_distance: f32,
}

impl Default for EditorContext {
    fn default() -> Self {
        Self {
            show_left_panel: false,
            show_right_panel: false,
            selected_entity: None,
            grayscale_enabled: false,
            prefabs: Vec::new(),
            hovered_file_path: None,
            drag_file_type: None,
            gizmo: None,
            gizmo_mode: GizmoMode::Translation,
            hover_axis: None,
            drag_mode: GizmoDragMode::None,
            camera_distance: 10.0,
        }
    }
}
