"use client"; import { ChevronRight, Home } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import React, { useEffect, useState } from "react"; // ============================================================================ // BREADCRUMB COMPONENTS // ============================================================================ interface BreadcrumbItem { label: string; href: string; } const routeNameMap: Record = { 'dashboard': 'Dashboard', 'candidate-explorer': 'Candidate Explorer', 'recruitment': 'Recruitment', 'upload': 'Upload', 'extract': 'Extract Profile', 'settings': 'Settings', 'profile': 'Profile', 'admin': 'Admin', 'users': 'Users', 'reports': 'Reports', }; function Breadcrumb({ children }: { children: React.ReactNode }) { return ( ); } function BreadcrumbList({ children }: { children: React.ReactNode }) { return (
    {children}
); } function BreadcrumbItem({ children }: { children: React.ReactNode }) { return (
  • {children}
  • ); } function BreadcrumbLink({ href, children }: { href?: string; children: React.ReactNode }) { if (!href) { return ( {children} ); } return ( {children} ); } function BreadcrumbHome({ href = '/' }: { href?: string }) { return ( ); } function BreadcrumbSeparator() { return ( ); } function BreadcrumbPage({ children }: { children: React.ReactNode }) { return ( {children} ); } function DynamicBreadcrumb() { const pathname = usePathname(); const generateBreadcrumbs = (): BreadcrumbItem[] => { const segments = pathname.split('/').filter(segment => segment !== ''); if (segments.length === 0) { return []; } const breadcrumbs: BreadcrumbItem[] = []; let currentPath = ''; segments.forEach((segment) => { currentPath += `/${segment}`; const label = routeNameMap[segment] || formatSegment(segment); breadcrumbs.push({ label, href: currentPath }); }); return breadcrumbs; }; const formatSegment = (segment: string): string => { return segment .split('-') .map(word => word.charAt(0).toUpperCase() + word.slice(1)) .join(' '); }; const breadcrumbs = generateBreadcrumbs(); if (breadcrumbs.length === 0) { return null; } return ( {breadcrumbs.map((crumb, index) => { const isLast = index === breadcrumbs.length - 1; return ( {isLast ? ( {crumb.label} ) : ( {crumb.label} )} ); })} ); } export function HeaderMenu() { const [now, setNow] = useState(null) useEffect(() => { setNow(new Date()) // set on client only const interval = setInterval(() => setNow(new Date()), 1000) return () => clearInterval(interval) }, []) const dateStr = now?.toLocaleDateString("en-US", { weekday: "long", day: "2-digit", month: "short", year: "numeric", hour: "2-digit", minute: "2-digit", second: "2-digit", }) ?? "" return ( <>
    {/* Dashboard */}
    {dateStr}

    Recruitment AI Dashboard – MT Intake

    ); }