"use client" import * as React from "react" import { cn } from "cn" import { MenuIcon } from "lucide-react" import { Slot } from "radix-ui" import { Button } from "../../components/ui/button" import { Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "../../components/ui/sheet" // GNB pattern: the global bar of a service (brand, primary navigation, utilities). It owns the bar (height, surface, border, padding, // gaps, the desktop / mobile switch) and nothing inside it: the primary navigation is the HM Navigation Menu, the user menu is // Dropdown Menu + Avatar, the mobile menu is a Sheet, icon actions are Buttons with Tooltip / Badge / Popover. All of them are composed // as children and keep their own look and behavior. No menu data lives here; the consumer renders its own items. // // …… (mobile only: hamburger → Sheet) // … // … (desktop only) // … // // Position is static by default; `sticky` pins it to the top of the scroll container. It is never fixed: the page layout decides. // The bar height is exposed as `--hm-gnb-height` for the content layout of GNB Mode. function GNB({ className, sticky = false, ...props }: React.ComponentProps<"header"> & { sticky?: boolean }) { return
} // Brand link, horizontal: an optional `img` / `svg` logo (only when you have a logo asset; no placeholder, no empty space) then one // `` with an optional `` eyebrow and a `` name; both shorten with an ellipsis when the bar is tight. // `asChild` renders the consumer's router link. function GNBBrand({ className, asChild = false, ...props }: React.ComponentProps<"a"> & { asChild?: boolean }) { const Comp = asChild ? Slot.Root : "a" return } // Primary navigation region (desktop only; hidden below the mobile breakpoint), centered on the whole bar. It holds the HM // ``, which already renders the `