"use client";
import * as AccordionPrimitive from '@radix-ui/react-accordion';
import { ChevronDown } from 'lucide-react';
import { clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
import { jsx, jsxs } from 'react/jsx-runtime';

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
function cn(...inputs) {
  return twMerge(clsx(inputs));
}
__name(cn, "cn");
var Accordion = AccordionPrimitive.Root;
var AccordionItem = /* @__PURE__ */ __name(({ className, ref, ...props }) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { className: cn("", className), ref, ...props }), "AccordionItem");
AccordionItem.displayName = "AccordionItem";
var AccordionTrigger = /* @__PURE__ */ __name(({
  className,
  children,
  hideArrow = false,
  ref,
  ...props
}) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
  AccordionPrimitive.Trigger,
  {
    className: cn(
      "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
      className
    ),
    ref,
    ...props,
    children: [
      children,
      hideArrow ? null : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-200" })
    ]
  }
) }), "AccordionTrigger");
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
var AccordionContent = /* @__PURE__ */ __name(({
  className,
  children,
  ref,
  ...props
}) => /* @__PURE__ */ jsx(
  AccordionPrimitive.Content,
  {
    className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down w-full overflow-hidden text-sm transition-all",
    ref,
    ...props,
    children: /* @__PURE__ */ jsx("div", { className: cn("pt-0 pb-4", className), children })
  }
), "AccordionContent");
AccordionContent.displayName = AccordionPrimitive.Content.displayName;

export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
