import { t as e } from "../chunks/ui.module-BisoTevy.js";
import { t } from "../chunks/flex-DYZ0IbU6.js";
import { useId as n, useState as r } from "react";
import { cn as i } from "@ryuzaki13/react-foundation-lib/utils";
import { ChevronDownIcon as a, ChevronUpIcon as o } from "lucide-react";
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
var u = {
	disclosure: "O-da-N",
	disclosureHeader: "P-rCx1",
	disclosureButton: "_9yjaDf",
	disclosureActions: "izVkky",
	disclosureGroup: "KAIPfW"
};
//#endregion
//#region src/disclosure/Disclosure.tsx
function d({ label: d, defaultOpen: f, headerActions: p, children: m }) {
	let [h, g] = r(f === !0), _ = n(), v = n();
	return /* @__PURE__ */ l("div", {
		className: i(e.uiElement, e.uiPanel, u.disclosure),
		children: [/* @__PURE__ */ l("div", {
			className: u.disclosureHeader,
			children: [/* @__PURE__ */ l("button", {
				id: v,
				type: "button",
				"aria-expanded": h,
				"aria-controls": _,
				className: i(u.disclosureButton, "fontBold radiusSm paddingSm gapSm"),
				"data-ui": "disclosure-toggle",
				"data-action": h ? "collapse-disclosure" : "expand-disclosure",
				onClick: () => g((e) => !e),
				children: [c(h ? o : a, {}), d]
			}), p ? /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c(t, {}), p] }) : null]
		}), h && /* @__PURE__ */ c("div", {
			id: _,
			role: "region",
			"aria-labelledby": v,
			children: /* @__PURE__ */ c("div", {
				className: "paddingMd",
				children: m
			})
		})]
	});
}
//#endregion
//#region src/disclosure/DisclosureGroup.tsx
function f({ className: e, children: t }) {
	return /* @__PURE__ */ c("div", {
		className: i(u.disclosureGroup, e),
		children: t
	});
}
//#endregion
export { d as Disclosure, f as DisclosureGroup };

//# sourceMappingURL=index.js.map