import { Link } from "react-router"; import { useShop } from "../shop/useShop"; import { useTheme } from "../theme/useTheme"; import "../style/navbar.css"; function SharedNavbar({ variant = "hero", active = "", brandMode = "logo" }) { const { cart, openCart, openProfile, panelOpen, panelType, user } = useShop(); const { isLight, toggleTheme } = useTheme(); const cartCount = cart.total_quantity || 0; const cartLabel = cartCount > 0 ? `Warenkorb ${cartCount}` : "Warenkorb"; const cartCompactLabel = cartCount > 0 ? `Korb ${cartCount}` : "Korb"; const cartAriaLabel = cartCount > 0 ? `Warenkorb mit ${cartCount} ${cartCount === 1 ? "Artikel" : "Artikeln"} öffnen` : "Warenkorb öffnen"; const logoSrc = variant === "hero" ? "/atmos-logo-light.svg" : "/atmos-logo-dark.svg"; const brandIsBack = brandMode === "back"; return (
); } export default SharedNavbar;