"use client";

// src/components/ui/collapsible.tsx
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
import { jsx } from "react/jsx-runtime";
function CollapsibleContent({
  ...props
}) {
  return /* @__PURE__ */ jsx(
    CollapsiblePrimitive.CollapsibleContent,
    {
      "data-slot": "collapsible-content",
      ...props
    }
  );
}

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

// src/components/data-views/outline-tree-menu.tsx
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
var outlineTreeSubInsetClass = {
  sidebar: "mx-3.5 flex min-w-0 list-none translate-x-px flex-col gap-1 border-s border-sidebar-border px-2.5 py-0.5 rtl:-translate-x-px",
  panel: "mx-3.5 flex min-w-0 list-none translate-x-px flex-col gap-1 border-s border-border/60 px-2.5 py-0.5 rtl:-translate-x-px"
};
var outlineTreeSubChevronRailClass = {
  sidebar: "flex min-w-0 flex-1 list-none flex-col gap-1 border-s border-sidebar-border py-0.5 ps-2.5",
  panel: "flex min-w-0 flex-1 list-none flex-col gap-1 border-s border-border/60 py-0.5 ps-2.5"
};
var OUTLINE_TREE_SUB_ROW_SHIFT_CLASS = "-translate-x-px rtl:translate-x-px";
var OUTLINE_TREE_COLLAPSIBLE_CONTENT_RAIL_CLASS = "flex min-w-0 w-full";
var OUTLINE_TREE_CHEVRON_GUIDE_SPACER_CLASS = "w-6 shrink-0";
function OutlineTreeCollapsibleContentRail({
  className,
  children,
  ...props
}) {
  return /* @__PURE__ */ jsxs(
    CollapsibleContent,
    {
      className: cn(OUTLINE_TREE_COLLAPSIBLE_CONTENT_RAIL_CLASS, className),
      ...props,
      children: [
        /* @__PURE__ */ jsx2("div", { className: OUTLINE_TREE_CHEVRON_GUIDE_SPACER_CLASS, "aria-hidden": true }),
        children
      ]
    }
  );
}
function OutlineTreeSub({
  surface = "panel",
  guideLayout = "inset",
  className,
  ...props
}) {
  return /* @__PURE__ */ jsx2(
    "ul",
    {
      "data-slot": "outline-tree-sub",
      "data-guide-layout": guideLayout,
      className: cn(
        guideLayout === "inset" && outlineTreeSubInsetClass[surface],
        guideLayout === "chevronRail" && outlineTreeSubChevronRailClass[surface],
        className
      ),
      ...props
    }
  );
}
function OutlineTreeMenu({ className, ...props }) {
  return /* @__PURE__ */ jsx2(
    "ul",
    {
      "data-slot": "outline-tree-menu",
      className: cn("flex w-full min-w-0 list-none flex-col gap-0", className),
      ...props
    }
  );
}
function OutlineTreeMenuItem({ className, ...props }) {
  return /* @__PURE__ */ jsx2(
    "li",
    {
      "data-slot": "outline-tree-menu-item",
      className: cn("group/menu-item relative min-w-0 w-full list-none", className),
      ...props
    }
  );
}
function OutlineTreeSubItem({ className, ...props }) {
  return /* @__PURE__ */ jsx2(
    "li",
    {
      "data-slot": "outline-tree-sub-item",
      className: cn("group/menu-sub-item relative min-w-0 w-full list-none", className),
      ...props
    }
  );
}
function OutlineTreeLeafButton({
  surface = "panel",
  isActive = false,
  subGuideAlign = false,
  className,
  ...props
}) {
  return /* @__PURE__ */ jsx2(
    "button",
    {
      type: "button",
      "data-active": isActive || void 0,
      className: cn(
        "flex min-h-8 w-full min-w-0 cursor-pointer select-none items-center gap-2 overflow-hidden rounded-md px-2 text-start text-sm outline-none ring-ring focus-visible:ring-2 focus-visible:ring-inset [&>svg]:size-4 [&>svg]:shrink-0",
        subGuideAlign && OUTLINE_TREE_SUB_ROW_SHIFT_CLASS,
        surface === "panel" && cn(
          "text-foreground hover:bg-muted/50",
          isActive && "bg-accent font-medium text-accent-foreground"
        ),
        surface === "sidebar" && cn(
          "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
          isActive && "bg-sidebar-accent font-medium text-sidebar-accent-foreground"
        ),
        className
      ),
      ...props
    }
  );
}
export {
  OUTLINE_TREE_CHEVRON_GUIDE_SPACER_CLASS,
  OUTLINE_TREE_COLLAPSIBLE_CONTENT_RAIL_CLASS,
  OUTLINE_TREE_SUB_ROW_SHIFT_CLASS,
  OutlineTreeCollapsibleContentRail,
  OutlineTreeLeafButton,
  OutlineTreeMenu,
  OutlineTreeMenuItem,
  OutlineTreeSub,
  OutlineTreeSubItem
};
//# sourceMappingURL=outline-tree-menu.js.map