// Project detail page with Kanban board

use leptos::prelude::*;
use leptos_router::hooks::use_params_map;

use crate::components::{KanbanBoard, NavBar};

/// Project detail page showing Kanban board
#[component]
pub fn ProjectDetailPage() -> impl IntoView {
    let params = use_params_map();
    let project_id = move || {
        params
            .get()
            .get("id")
            .unwrap_or_else(|| "unknown".to_string())
    };

    view! {
        <div class="min-h-screen bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 flex flex-col">
            <NavBar />

            <div class="flex-1 w-full">
                <KanbanBoard project_id=project_id() />
            </div>
        </div>
    }
}
