import { a as e, n as t, r as n, t as r } from "./dist-DCjaNViz.js";
import { o as i, t as a } from "./dist-D-6_qntS.js";
import { t as o } from "./dist-DjSP8Xx2.js";
import { t as s } from "./dist-BSqU5QJM.js";
import { t as c } from "./dist-BN9-Ksur.js";
import { t as l } from "./dist-o21Z8vCD.js";
import { t as u } from "./utils-CHlhTiFC.js";
import { t as d } from "./dist-C2Jrcfwk.js";
import { t as f } from "./chevron-down-DnbuLcwD.js";
import * as p from "react";
import m from "react";
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
//#region node_modules/@radix-ui/react-collapsible/dist/index.mjs
var v = "Collapsible", [y, b] = e(v), [x, S] = y(v), C = p.forwardRef((e, t) => {
	let { __scopeCollapsible: n, open: i, defaultOpen: o, disabled: s, onOpenChange: l, ...u } = e, [d, f] = r({
		prop: i,
		defaultProp: o ?? !1,
		onChange: l,
		caller: v
	});
	return /* @__PURE__ */ g(x, {
		scope: n,
		disabled: s,
		contentId: c(),
		open: d,
		onOpenToggle: p.useCallback(() => f((e) => !e), [f]),
		children: /* @__PURE__ */ g(a.div, {
			"data-state": O(d),
			"data-disabled": s ? "" : void 0,
			...u,
			ref: t
		})
	});
});
C.displayName = v;
var w = "CollapsibleTrigger", T = p.forwardRef((e, t) => {
	let { __scopeCollapsible: r, ...i } = e, o = S(w, r);
	return /* @__PURE__ */ g(a.button, {
		type: "button",
		"aria-controls": o.contentId,
		"aria-expanded": o.open || !1,
		"data-state": O(o.open),
		"data-disabled": o.disabled ? "" : void 0,
		disabled: o.disabled,
		...i,
		ref: t,
		onClick: n(e.onClick, o.onOpenToggle)
	});
});
T.displayName = w;
var E = "CollapsibleContent", D = p.forwardRef((e, t) => {
	let { forceMount: n, ...r } = e, i = S(E, e.__scopeCollapsible);
	return /* @__PURE__ */ g(s, {
		present: n || i.open,
		children: ({ present: e }) => /* @__PURE__ */ g(ee, {
			...r,
			ref: t,
			present: e
		})
	});
});
D.displayName = E;
var ee = p.forwardRef((e, n) => {
	let { __scopeCollapsible: r, present: o, children: s, ...c } = e, l = S(E, r), [u, d] = p.useState(o), f = p.useRef(null), m = i(n, f), h = p.useRef(0), _ = h.current, v = p.useRef(0), y = v.current, b = l.open || u, x = p.useRef(b), C = p.useRef(void 0);
	return p.useEffect(() => {
		let e = requestAnimationFrame(() => x.current = !1);
		return () => cancelAnimationFrame(e);
	}, []), t(() => {
		let e = f.current;
		if (e) {
			C.current = C.current || {
				transitionDuration: e.style.transitionDuration,
				animationName: e.style.animationName
			}, e.style.transitionDuration = "0s", e.style.animationName = "none";
			let t = e.getBoundingClientRect();
			h.current = t.height, v.current = t.width, x.current || (e.style.transitionDuration = C.current.transitionDuration, e.style.animationName = C.current.animationName), d(o);
		}
	}, [l.open, o]), /* @__PURE__ */ g(a.div, {
		"data-state": O(l.open),
		"data-disabled": l.disabled ? "" : void 0,
		id: l.contentId,
		hidden: !b,
		...c,
		ref: m,
		style: {
			"--radix-collapsible-content-height": _ ? `${_}px` : void 0,
			"--radix-collapsible-content-width": y ? `${y}px` : void 0,
			...e.style
		},
		children: b && s
	});
});
function O(e) {
	return e ? "open" : "closed";
}
var te = C, ne = T, re = D, k = "Accordion", ie = [
	"Home",
	"End",
	"ArrowDown",
	"ArrowUp",
	"ArrowLeft",
	"ArrowRight"
], [A, ae, oe] = o(k), [j, se] = e(k, [oe, b]), M = b(), N = m.forwardRef((e, t) => {
	let { type: n, ...r } = e, i = r, a = r;
	return /* @__PURE__ */ g(A.Provider, {
		scope: e.__scopeAccordion,
		children: n === "multiple" ? /* @__PURE__ */ g(de, {
			...a,
			ref: t
		}) : /* @__PURE__ */ g(ue, {
			...i,
			ref: t
		})
	});
});
N.displayName = k;
var [P, ce] = j(k), [F, le] = j(k, { collapsible: !1 }), ue = m.forwardRef((e, t) => {
	let { value: n, defaultValue: i, onValueChange: a = () => {}, collapsible: o = !1, ...s } = e, [c, l] = r({
		prop: n,
		defaultProp: i ?? "",
		onChange: a,
		caller: k
	});
	return /* @__PURE__ */ g(P, {
		scope: e.__scopeAccordion,
		value: m.useMemo(() => c ? [c] : [], [c]),
		onItemOpen: l,
		onItemClose: m.useCallback(() => o && l(""), [o, l]),
		children: /* @__PURE__ */ g(F, {
			scope: e.__scopeAccordion,
			collapsible: o,
			children: /* @__PURE__ */ g(L, {
				...s,
				ref: t
			})
		})
	});
}), de = m.forwardRef((e, t) => {
	let { value: n, defaultValue: i, onValueChange: a = () => {}, ...o } = e, [s, c] = r({
		prop: n,
		defaultProp: i ?? [],
		onChange: a,
		caller: k
	}), l = m.useCallback((e) => c((t = []) => [...t, e]), [c]), u = m.useCallback((e) => c((t = []) => t.filter((t) => t !== e)), [c]);
	return /* @__PURE__ */ g(P, {
		scope: e.__scopeAccordion,
		value: s,
		onItemOpen: l,
		onItemClose: u,
		children: /* @__PURE__ */ g(F, {
			scope: e.__scopeAccordion,
			collapsible: !0,
			children: /* @__PURE__ */ g(L, {
				...o,
				ref: t
			})
		})
	});
}), [fe, I] = j(k), L = m.forwardRef((e, t) => {
	let { __scopeAccordion: r, disabled: o, dir: s, orientation: c = "vertical", ...u } = e, d = i(m.useRef(null), t), f = ae(r), p = l(s) === "ltr", h = n(e.onKeyDown, (e) => {
		if (!ie.includes(e.key)) return;
		let t = e.target, n = f().filter((e) => !e.ref.current?.disabled), r = n.findIndex((e) => e.ref.current === t), i = n.length;
		if (r === -1) return;
		e.preventDefault();
		let a = r, o = i - 1, s = () => {
			a = r + 1, a > o && (a = 0);
		}, l = () => {
			a = r - 1, a < 0 && (a = o);
		};
		switch (e.key) {
			case "Home":
				a = 0;
				break;
			case "End":
				a = o;
				break;
			case "ArrowRight":
				c === "horizontal" && (p ? s() : l());
				break;
			case "ArrowDown":
				c === "vertical" && s();
				break;
			case "ArrowLeft":
				c === "horizontal" && (p ? l() : s());
				break;
			case "ArrowUp":
				c === "vertical" && l();
				break;
		}
		n[a % i].ref.current?.focus();
	});
	return /* @__PURE__ */ g(fe, {
		scope: r,
		disabled: o,
		direction: s,
		orientation: c,
		children: /* @__PURE__ */ g(A.Slot, {
			scope: r,
			children: /* @__PURE__ */ g(a.div, {
				...u,
				"data-orientation": c,
				ref: d,
				onKeyDown: o ? void 0 : h
			})
		})
	});
}), R = "AccordionItem", [pe, z] = j(R), B = m.forwardRef((e, t) => {
	let { __scopeAccordion: n, value: r, ...i } = e, a = I(R, n), o = ce(R, n), s = M(n), l = c(), u = r && o.value.includes(r) || !1, d = a.disabled || e.disabled;
	return /* @__PURE__ */ g(pe, {
		scope: n,
		open: u,
		disabled: d,
		triggerId: l,
		children: /* @__PURE__ */ g(te, {
			"data-orientation": a.orientation,
			"data-state": q(u),
			...s,
			...i,
			ref: t,
			disabled: d,
			open: u,
			onOpenChange: (e) => {
				e ? o.onItemOpen(r) : o.onItemClose(r);
			}
		})
	});
});
B.displayName = R;
var V = "AccordionHeader", H = m.forwardRef((e, t) => {
	let { __scopeAccordion: n, ...r } = e, i = I(k, n), o = z(V, n);
	return /* @__PURE__ */ g(a.h3, {
		"data-orientation": i.orientation,
		"data-state": q(o.open),
		"data-disabled": o.disabled ? "" : void 0,
		...r,
		ref: t
	});
});
H.displayName = V;
var U = "AccordionTrigger", W = m.forwardRef((e, t) => {
	let { __scopeAccordion: n, ...r } = e, i = I(k, n), a = z(U, n), o = le(U, n), s = M(n);
	return /* @__PURE__ */ g(A.ItemSlot, {
		scope: n,
		children: /* @__PURE__ */ g(ne, {
			"aria-disabled": a.open && !o.collapsible || void 0,
			"data-orientation": i.orientation,
			id: a.triggerId,
			...s,
			...r,
			ref: t
		})
	});
});
W.displayName = U;
var G = "AccordionContent", K = m.forwardRef((e, t) => {
	let { __scopeAccordion: n, ...r } = e, i = I(k, n), a = z(G, n), o = M(n);
	return /* @__PURE__ */ g(re, {
		role: "region",
		"aria-labelledby": a.triggerId,
		"data-orientation": i.orientation,
		...o,
		...r,
		ref: t,
		style: {
			"--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
			"--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
			...e.style
		}
	});
});
K.displayName = G;
function q(e) {
	return e ? "open" : "closed";
}
var J = N, me = B, he = H, Y = W, X = K, ge = d("", {
	variants: { variant: {
		primary: "bg-primary-gray-200 dark:bg-primary-gray-650 text-primary-gray-700 dark:text-primary-white mb-4 px-4 py-1",
		secondary: "bg-primary-gray-200 dark:bg-primary-gray-650 text-primary-gray-700 dark:text-primary-white mb-0 px-4 py-1 border-b border-b-primary-gray-400 dark:border-b-primary-gray-550 last:border-b-0",
		tertiary: "bg-transparent text-primary-gray-700 dark:text-primary-white mb-0 py-2 px-0 border-b border-b-primary-gray-400 dark:border-b-primary-gray-500",
		quaternary: "bg-transparent text-primary-gray-700 dark:text-primary-white mb-0 py-0 px-0"
	} },
	defaultVariants: { variant: "primary" }
}), _e = d("flex flex-1 items-center transition-all text-left text-primary-gray-700 dark:text-primary-white [&[data-state=open]>svg]:rotate-180", {
	variants: { variant: {
		primary: "font-normal text-xl justify-between",
		secondary: "uppercase font-normal text-base justify-between",
		tertiary: "uppercase font-normal text-2xl justify-between",
		quaternary: "uppercase font-bold text-base gap-3"
	} },
	defaultVariants: { variant: "primary" }
}), ve = d("overflow-hidden text-primary-gray-700 dark:text-primary-white text-base data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", {
	variants: { variant: {
		primary: "my-3.5",
		secondary: "my-3.5",
		tertiary: "my-3.5 px-3.5",
		quaternary: "my-3.5 p-0"
	} },
	defaultVariants: { variant: "primary" }
}), Z = m.createContext(null), Q = m.forwardRef(({ variant: e, children: t, ...n }, r) => /* @__PURE__ */ g(Z.Provider, {
	value: { variant: e },
	children: /* @__PURE__ */ g(J, {
		ref: r,
		...n,
		children: t
	})
}));
Q.displayName = J.displayName;
var $ = m.forwardRef(({ className: e, ...t }, n) => {
	let r = u(ge({ variant: m.useContext(Z)?.variant }), e);
	return /* @__PURE__ */ g(me, {
		...t,
		ref: n,
		className: u(r, e)
	});
});
$.displayName = "AccordionItem";
var ye = m.forwardRef(({ className: e, children: t, ...n }, r) => {
	let i = m.useContext(Z);
	return /* @__PURE__ */ g(he, {
		className: "flex my-4",
		children: /* @__PURE__ */ g(Y, {
			...n,
			ref: r,
			className: u(_e({ variant: i?.variant }), e),
			children: i?.variant === "quaternary" ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(f, { className: "h-6 w-6 shrink-0 text-accent-red dark:text-primary-white transition-transform duration-200" }), t] }) : /* @__PURE__ */ _(h, { children: [t, /* @__PURE__ */ g(f, { className: "h-6 w-6 shrink-0 text-accent-red dark:text-primary-white transition-transform duration-200" })] })
		})
	});
});
ye.displayName = Y.displayName;
var be = m.forwardRef(({ className: e, children: t, ...n }, r) => {
	let i = m.useContext(Z);
	return /* @__PURE__ */ g(X, {
		...n,
		ref: r,
		className: u(ve({ variant: i?.variant }), e),
		children: /* @__PURE__ */ g("div", {
			className: e,
			children: t
		})
	});
});
be.displayName = X.displayName;
//#endregion
export { ye as i, be as n, $ as r, Q as t };

//# sourceMappingURL=accordion-CaY9D7wi.js.map