import { FolderPlus, Hammer, Menu, Workflow, X } from "lucide-react"; import { useState } from "react"; import { Link, NavLink } from "react-router-dom"; import { useAuth } from "@/client/auth"; import { UserMenu } from "@/client/components/user-menu"; const navLinkClass = ({ isActive }: { isActive: boolean }): string => [ "flex items-center gap-1.5 rounded-lg px-3 py-1.5 text-sm font-medium transition-colors", isActive ? "bg-accent-500/10 text-accent-400" : "text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200", ].join(" "); interface HeaderProps { variant?: "app" | "public"; } const HeaderBrand = ({ href, subtitle }: { href: string; subtitle: string }) => ( anvil {subtitle} ); const PublicHeaderActions = ({ isAuthenticated }: { isAuthenticated: boolean }) => (
{isAuthenticated ? : null}
); export const Header = ({ variant = "app" }: HeaderProps) => { const { isAuthenticated } = useAuth(); const [mobileNavOpen, setMobileNavOpen] = useState(false); if (variant === "public") { return (
); } return (
{isAuthenticated ? ( ) : null}
{isAuthenticated ? ( ) : null}
{mobileNavOpen && isAuthenticated ? ( ) : null}
); };