"use client"; import { usePathname } from "next/navigation"; import { useAuth } from "@/hooks/use-auth"; import { LogOut, Menu } from "lucide-react"; const pageTitles: Record = { "/dashboard": "Dashboard", "/inbox": "Inbox", "/contacts": "Contacts", "/pipelines": "Pipelines", "/broadcasts": "Broadcasts", "/automations": "Automations", "/settings": "Settings", }; function getPageTitle(pathname: string): string { if (pageTitles[pathname]) return pageTitles[pathname]; const match = Object.entries(pageTitles).find(([path]) => pathname.startsWith(path), ); return match ? match[1] : "Dashboard"; } interface HeaderProps { /** Wired to the shell's drawer state. Used only on mobile — the * hamburger button is hidden on lg+. */ onOpenSidebar?: () => void; } export function Header({ onOpenSidebar }: HeaderProps) { const pathname = usePathname(); const { profile, signOut } = useAuth(); const title = getPageTitle(pathname); return (
{/* Hamburger — mobile only. 44×44 hit target per Apple HIG. */}

{title}

{profile?.full_name?.charAt(0)?.toUpperCase() ?? "U"}

{profile?.full_name ?? "User"}

); }