// @bun
// src/presentation/features/molecules/FeatureCategoryHeader/FeatureCategoryHeader.tsx
import { cn } from "@contractspec/lib.ui-kit-web/ui/utils";
import { ChevronDown, Boxes } from "lucide-react";
import { HStack } from "@contractspec/lib.ui-kit-web/ui/stack";
import { StatusChip } from "@contractspec/lib.design-system";
import { jsx, jsxs } from "react/jsx-runtime";
"use client";
function FeatureCategoryHeader({
  title,
  count,
  icon,
  isCollapsed = false,
  onToggle,
  className
}) {
  return /* @__PURE__ */ jsxs("button", {
    type: "button",
    onClick: onToggle,
    className: cn("flex w-full items-center justify-between rounded-lg px-4 py-3", "bg-muted/30 hover:bg-muted/50 transition-colors", "group cursor-pointer", className),
    children: [
      /* @__PURE__ */ jsxs(HStack, {
        gap: "sm",
        className: "items-center",
        children: [
          /* @__PURE__ */ jsx("div", {
            className: "text-muted-foreground group-hover:text-foreground transition-colors",
            children: icon || /* @__PURE__ */ jsx(Boxes, {
              className: "h-5 w-5"
            })
          }),
          /* @__PURE__ */ jsx("span", {
            className: "group-hover:text-primary text-lg font-semibold capitalize transition-colors",
            children: title
          }),
          /* @__PURE__ */ jsx(StatusChip, {
            tone: "neutral",
            label: `${count} ${count === 1 ? "feature" : "features"}`,
            size: "sm"
          })
        ]
      }),
      /* @__PURE__ */ jsx(ChevronDown, {
        className: cn("text-muted-foreground h-5 w-5 transition-transform duration-200", isCollapsed && "-rotate-90")
      })
    ]
  });
}
export {
  FeatureCategoryHeader
};
