// src/lib/utils.ts
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
function cn(...inputs) {
  return twMerge(clsx(inputs));
}

// src/components/templates/nested-secondary-panel-shell.tsx
import { jsx } from "react/jsx-runtime";
function NestedSecondaryPanelShell({
  open,
  compact,
  children,
  "aria-label": ariaLabel = "Secondary navigation",
  className
}) {
  return /* @__PURE__ */ jsx(
    "nav",
    {
      "aria-label": ariaLabel,
      "data-slot": "secondary-panel",
      "data-state": open ? "open" : "closed",
      "data-layout": open ? compact ? "icon" : "expanded" : "closed",
      suppressHydrationWarning: true,
      className: cn(
        "flex flex-col overflow-hidden",
        "transition-[width,margin,opacity] duration-200 ease-linear",
        open ? cn(
          // Match the primary sidebar: fill the full viewport height
          // (minus our 0.5rem top + 0.5rem bottom margin from `m-2` →
          // 1rem on desktop where the panel is `md:sticky md:top-2`;
          // 2rem on mobile where the panel scrolls inline and we leave
          // a little more breathing room). No upper cap so tall screens
          // get a fully-extended rail.
          "shrink-0 m-2 mx-2 rounded-xl ring-1 ring-sidebar-border shadow-sm relative md:sticky md:top-2 bg-[var(--secondary-panel-bg)]",
          compact ? "w-12 min-w-12 max-w-12 h-[calc(100svh-2rem)] md:h-[calc(100svh-1rem)]" : "w-64 min-w-64 max-w-64 h-[calc(100svh-2rem)] md:h-[calc(100svh-1rem)]"
        ) : "h-0 min-h-0 shrink overflow-hidden border-0 p-0 m-0 min-w-0 w-0 max-w-0 opacity-0 pointer-events-none",
        className
      ),
      children: /* @__PURE__ */ jsx(
        "div",
        {
          className: cn(
            "flex flex-1 flex-col overflow-y-auto overflow-x-hidden",
            open ? "min-w-0" : "hidden min-w-0 w-0 p-0"
          ),
          children
        }
      )
    }
  );
}
export {
  NestedSecondaryPanelShell
};
//# sourceMappingURL=nested-secondary-panel-shell.js.map