import { Outlet, Link, useLocation } from "react-router-dom"; import { useAuth } from "@/contexts/AuthContext"; import { getRoleLabel } from "@/data/dummyData"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Fish, LogOut, ChevronRight } from "lucide-react"; const navItems = [ { label: "Dashboard", href: "/hatchery/dashboard" }, { label: "My Applications", href: "/hatchery/applications" }, { label: "My Certificates", href: "/hatchery/certificates" }, ]; export function HatcheryLayout() { const { user, logout } = useAuth(); const location = useLocation(); const path = location.pathname; let breadcrumb: string[] = ["Dashboard"]; let title = "Dashboard"; if (path === "/hatchery/applications") { breadcrumb = ["Dashboard", "My Applications"]; title = "My Hatchery Applications"; } else if (path.startsWith("/hatchery/applications/") && path.endsWith("/nc-response")) { breadcrumb = ["Dashboard", "My Applications", "NC Response"]; title = "NC Response"; } else if (path.startsWith("/hatchery/applications/")) { breadcrumb = ["Dashboard", "My Applications", "Application Details"]; title = "Application Details"; } else if (path === "/hatchery/certificates") { breadcrumb = ["Dashboard", "My Certificates"]; title = "My Certificates"; } return (