import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsxs, jsx } from 'react/jsx-runtime';

// src/lib/utils.ts
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
function AppSidebarNav({ brand, groups, footer, className }) {
  return /* @__PURE__ */ jsxs("div", { className: cn("flex h-full flex-col", className), children: [
    brand ? /* @__PURE__ */ jsx("div", { className: "flex h-16 flex-none items-center border-b border-border px-4", children: brand }) : null,
    /* @__PURE__ */ jsx("nav", { className: "flex-1 overflow-y-auto px-3 py-4", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs("div", { className: cn(groupIndex > 0 && "mt-6"), children: [
      group.title ? /* @__PURE__ */ jsx("p", { className: "px-3 pb-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: group.title }) : null,
      /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1", children: group.items.map((item, itemIndex) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs(
        "a",
        {
          href: item.href,
          "aria-current": item.active ? "page" : void 0,
          className: cn(
            "flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-all duration-[var(--duration-normal,200ms)] ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 [&_svg]:size-4 [&_svg]:flex-none",
            item.active ? "bg-muted text-foreground" : "text-muted-foreground hover:bg-muted hover:text-foreground"
          ),
          children: [
            item.icon ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: item.icon }) : null,
            /* @__PURE__ */ jsx("span", { children: item.label })
          ]
        }
      ) }, itemIndex)) })
    ] }, groupIndex)) }),
    footer ? /* @__PURE__ */ jsx("div", { className: "flex-none border-t border-border p-3", children: footer }) : null
  ] });
}

export { AppSidebarNav };
//# sourceMappingURL=app-sidebar-nav.js.map
//# sourceMappingURL=app-sidebar-nav.js.map