"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { ReactNode } from "react"; import { VIBNSidebar } from "./vibn-sidebar"; import { Toaster } from "sonner"; interface ProjectShellProps { children: ReactNode; workspace: string; projectId: string; projectName: string; projectStatus?: string; projectProgress?: number; } const TABS = [ { id: "overview", label: "Atlas", path: "overview" }, { id: "prd", label: "PRD", path: "prd" }, { id: "design", label: "Design", path: "design" }, { id: "build", label: "Build", path: "build" }, { id: "deployment", label: "Deploy", path: "deployment" }, { id: "settings", label: "Settings", path: "settings" }, ]; function StatusTag({ status }: { status?: string }) { const label = status === "live" ? "Live" : status === "building" ? "Building" : "Defining"; const color = status === "live" ? "#2e7d32" : status === "building" ? "#3d5afe" : "#9a7b3a"; const bg = status === "live" ? "#2e7d3210" : status === "building" ? "#3d5afe10" : "#d4a04a12"; return ( {label} ); } export function ProjectShell({ children, workspace, projectId, projectName, projectStatus, projectProgress, }: ProjectShellProps) { const pathname = usePathname(); // Determine which tab is active const activeTab = TABS.find((t) => pathname?.includes(`/${t.path}`))?.id ?? "overview"; const progress = projectProgress ?? 0; return ( <>
{/* Sidebar */} {/* Main content */}
{/* Project header */}
{projectName[0]?.toUpperCase() ?? "P"}

{projectName}

{progress}%
{/* Tab bar */}
{TABS.map((t) => ( {t.label} ))}
{/* Page content */}
{children}
); }