import { Menu as MenuIcon, ShoppingBag, Search } from "lucide-react"; import { useState } from "react"; import { Link } from "react-router"; import { useShopifyCart } from "@/hooks/use-shopify-cart"; import { Sheet, SheetContent, SheetHeader, SheetTitle } from "@/components/ui/sheet"; import { Container } from "@/components/layout/Container"; import { cn } from "@/lib/utils"; export type NavigationProps = { brand: string; logo?: string; links: Array<{ label: string; href: string }>; showSearch: "yes" | "no"; showCart: "yes" | "no"; sticky: "yes" | "no"; tone: "default" | "muted" | "inverse"; }; export function Navigation({ brand, logo, links, showSearch, showCart, sticky, tone, }: NavigationProps) { const [mobileOpen, setMobileOpen] = useState(false); const cart = useShopifyCart(); const itemCount = cart?.itemCount ?? 0; const toneClass: Record = { default: "bg-background text-foreground border-b border-border", muted: "bg-muted/40 text-foreground border-b border-border", inverse: "bg-foreground text-background", }; return ( <>
{logo ? ( {brand ) : ( brand || "Brand Logo" )}
{showSearch === "yes" && ( )} {showCart === "yes" && ( )}
{/* Mobile menu */} {brand} ); }