import { cn } from "../../lib/utils.js";
import { c } from "react/compiler-runtime";
import "react";
import { jsx, jsxs } from "react/jsx-runtime";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDownIcon } from "lucide-react";
function Accordion(e) {
	let i = c(4), a;
	i[0] === e ? a = i[1] : ({...a} = e, i[0] = e, i[1] = a);
	let o;
	return i[2] === a ? o = i[3] : (o = /* @__PURE__ */ jsx(AccordionPrimitive.Root, {
		"data-slot": "accordion",
		...a
	}), i[2] = a, i[3] = o), o;
}
function AccordionItem(i) {
	let a = c(8), o, s;
	a[0] === i ? (o = a[1], s = a[2]) : ({className: o, ...s} = i, a[0] = i, a[1] = o, a[2] = s);
	let l;
	a[3] === o ? l = a[4] : (l = cn("border-b last:border-b-0", o), a[3] = o, a[4] = l);
	let u;
	return a[5] !== s || a[6] !== l ? (u = /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
		"data-slot": "accordion-item",
		className: l,
		...s
	}), a[5] = s, a[6] = l, a[7] = u) : u = a[7], u;
}
function AccordionTrigger(o) {
	let s = c(11), l, u, d;
	s[0] === o ? (l = s[1], u = s[2], d = s[3]) : ({className: u, children: l, ...d} = o, s[0] = o, s[1] = l, s[2] = u, s[3] = d);
	let f;
	s[4] === u ? f = s[5] : (f = cn("focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", u), s[4] = u, s[5] = f);
	let p;
	s[6] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" }), s[6] = p) : p = s[6];
	let m;
	return s[7] !== l || s[8] !== d || s[9] !== f ? (m = /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
		className: "flex",
		children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
			"data-slot": "accordion-trigger",
			className: f,
			...d,
			children: [l, p]
		})
	}), s[7] = l, s[8] = d, s[9] = f, s[10] = m) : m = s[10], m;
}
function AccordionContent(i) {
	let a = c(12), o, s, l;
	a[0] === i ? (o = a[1], s = a[2], l = a[3]) : ({className: s, children: o, ...l} = i, a[0] = i, a[1] = o, a[2] = s, a[3] = l);
	let u;
	a[4] === s ? u = a[5] : (u = cn("pt-0 pb-4", s), a[4] = s, a[5] = u);
	let d;
	a[6] !== o || a[7] !== u ? (d = /* @__PURE__ */ jsx("div", {
		className: u,
		children: o
	}), a[6] = o, a[7] = u, a[8] = d) : d = a[8];
	let f;
	return a[9] !== l || a[10] !== d ? (f = /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
		"data-slot": "accordion-content",
		className: "data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
		...l,
		children: d
	}), a[9] = l, a[10] = d, a[11] = f) : f = a[11], f;
}
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
