import Link from "next/link";
import type { ReactNode } from "react";
import { content } from "@/lib/content";
import { CartTrigger } from "./CartTrigger";
import { MobileNavDialog } from "./MobileNavDialog";
import { PredictiveSearchTrigger } from "./PredictiveSearchTrigger";
/** Maps a header nav item to its route. "Collections" -> the collections
* index; the category items -> their collection PLP. */
const navItemHref: Record<(typeof content.header.navItems)[number], string> = {
Collections: "/collections",
Men: "/collections/men",
Women: "/collections/women",
Accessories: "/collections/accessories",
};
/**
* Site header — server shell + small client islands (engineering.md F7;
* `hydrogen-setup` / `references/navbar.md`). Server-rendered: logo ``,
* desktop nav ``s, and a real `` search trigger
* (server-rendered, F4 — reachable without JS). Client islands: `CartTrigger`
* (`showModal()` button, cart count), `PredictiveSearchTrigger` (hydrates
* the `/search` link into the modal trigger), `MobileNavDialog` (`