"use client";
import * as React from 'react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, jsx } from 'react/jsx-runtime';

function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function MenuGlyph({ open }) {
  return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", className: "size-5", children: open ? /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 6l12 12M18 6 6 18" }) : /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16M4 12h16M4 17h16" }) });
}
function MarketingHeader({ logo, links = [], actions, className }) {
  const [open, setOpen] = React.useState(false);
  return /* @__PURE__ */ jsxs("header", { className: cn("border-b border-border bg-background", className), children: [
    /* @__PURE__ */ jsxs("nav", { className: "mx-auto flex max-w-7xl items-center justify-between gap-6 px-6 py-4 lg:px-8", children: [
      /* @__PURE__ */ jsx("div", { className: "flex-none", children: logo }),
      links.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "hidden items-center gap-8 md:flex", children: links.map((link, index) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
        "a",
        {
          href: link.href,
          className: "text-sm font-medium text-muted-foreground transition-all duration-[var(--duration-normal,200ms)] ease-out hover:text-foreground",
          children: link.label
        }
      ) }, index)) }) : null,
      /* @__PURE__ */ jsx("div", { className: "hidden items-center gap-3 md:flex", children: actions }),
      links.length > 0 || actions ? /* @__PURE__ */ jsx(
        "button",
        {
          type: "button",
          className: "inline-flex items-center justify-center rounded-md p-2 text-foreground transition-all duration-[var(--duration-normal,200ms)] ease-out hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:hidden",
          "aria-expanded": open,
          "aria-controls": "marketing-header-mobile",
          "aria-label": open ? "Close menu" : "Open menu",
          onClick: () => setOpen((value) => !value),
          children: /* @__PURE__ */ jsx(MenuGlyph, { open })
        }
      ) : null
    ] }),
    open ? /* @__PURE__ */ jsx("div", { id: "marketing-header-mobile", className: "border-t border-border md:hidden", children: /* @__PURE__ */ jsxs("div", { className: "space-y-1 px-6 py-4", children: [
      links.map((link, index) => /* @__PURE__ */ jsx(
        "a",
        {
          href: link.href,
          className: "block rounded-md px-3 py-2 text-base font-medium text-muted-foreground transition-all duration-[var(--duration-normal,200ms)] ease-out hover:bg-muted hover:text-foreground",
          children: link.label
        },
        index
      )),
      actions ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3 pt-4 [&_button]:w-full [&>*]:w-full", children: actions }) : null
    ] }) }) : null
  ] });
}

export { MarketingHeader };
//# sourceMappingURL=marketing-header.js.map
//# sourceMappingURL=marketing-header.js.map