//! Behavior component definitions
//!
//! Catalog of available behavior tree components.

use super::{CargoDependency, Component, ComponentCatalog, ComponentType, Mecha10Config};

/// Add all behavior components to the catalog
pub fn add_behaviors(catalog: &mut ComponentCatalog) {
    // Idle Wander Behavior
    catalog.insert(Component {
        id: "idle-wander".to_string(),
        name: "Idle Wander".to_string(),
        description: "Basic wandering behavior with obstacle avoidance using subsumption architecture".to_string(),
        component_type: ComponentType::Behavior,
        version: "0.1.0".to_string(),
        category: "autonomous".to_string(),
        tags: vec![
            "wander".to_string(),
            "autonomous".to_string(),
            "subsumption".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-behavior-runtime".to_string(),
            version: None,
            path: Some("../../packages/behavior-runtime".to_string()),
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: None,
            behavior: Some("idle_wander".to_string()),
        },
    });

    // Patrol Simple Behavior
    catalog.insert(Component {
        id: "patrol-simple".to_string(),
        name: "Simple Patrol".to_string(),
        description: "Patrol between waypoints with obstacle detection and recovery behaviors".to_string(),
        component_type: ComponentType::Behavior,
        version: "0.1.0".to_string(),
        category: "navigation".to_string(),
        tags: vec!["patrol".to_string(), "waypoints".to_string(), "autonomous".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-behavior-runtime".to_string(),
            version: None,
            path: Some("../../packages/behavior-runtime".to_string()),
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: None,
            behavior: Some("patrol_simple".to_string()),
        },
    });

    // Obstacle Avoidance Behavior
    catalog.insert(Component {
        id: "obstacle-avoidance".to_string(),
        name: "Obstacle Avoidance".to_string(),
        description: "Reactive obstacle avoidance using sensor fusion and emergency stop".to_string(),
        component_type: ComponentType::Behavior,
        version: "0.1.0".to_string(),
        category: "safety".to_string(),
        tags: vec![
            "obstacle".to_string(),
            "avoidance".to_string(),
            "reactive".to_string(),
            "safety".to_string(),
        ],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-behavior-runtime".to_string(),
            version: None,
            path: Some("../../packages/behavior-runtime".to_string()),
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: None,
            behavior: Some("obstacle_avoidance".to_string()),
        },
    });

    // Basic Navigation Behavior
    catalog.insert(Component {
        id: "basic-navigation".to_string(),
        name: "Basic Navigation".to_string(),
        description: "Goal-directed navigation with path planning and obstacle avoidance".to_string(),
        component_type: ComponentType::Behavior,
        version: "0.1.0".to_string(),
        category: "navigation".to_string(),
        tags: vec!["navigation".to_string(), "planning".to_string(), "goal".to_string()],
        cargo_dependencies: vec![CargoDependency {
            name: "mecha10-behavior-runtime".to_string(),
            version: None,
            path: Some("../../packages/behavior-runtime".to_string()),
            features: vec![],
            optional: false,
        }],
        files: vec![],
        mecha10_config: Mecha10Config {
            driver: None,
            custom_node: None,
            behavior: Some("basic_navigation".to_string()),
        },
    });
}
