import { n as e } from "../chunks/button-BsvHGWPc.js";
import { l as t } from "../chunks/misc-aGQBhywJ.js";
import { useCallback as n, useId as r, useState as i } from "react";
import { cn as a } from "@ryuzaki13/react-foundation-lib/utils";
import { jsx as o, jsxs as s } from "react/jsx-runtime";
import { ChevronsLeftIcon as c, ChevronsRightIcon as l } from "lucide-react";
var u = {
	expandableActionPanel: "sj-rIq",
	content: "_3anR7j",
	contentScroller: "gMRIsT",
	labeledPanel: "f5Pv1e",
	label: "q7eZzv",
	labeledActionPanel: "maUL24"
};
//#endregion
//#region src/expandable-action-panel/ExpandableActionPanel.tsx
function d({ children: d, className: f, contentClassName: p, toggleClassName: m, open: h, defaultOpen: g = !1, disabled: _, onOpenChange: v, expandLabel: y = "Раскрыть панель действий влево", collapseLabel: b = "Свернуть панель действий", panelLabel: x = "Действия панели", itemSelector: S, scrollPadding: C, smoothScroll: w }) {
	let [T, E] = i(g), D = r(), O = h !== void 0, k = O ? h : T, A = n((e) => {
		let t = typeof e == "function" ? e(k) : e;
		O || E(t), v?.(t);
	}, [
		O,
		v,
		k
	]), j = () => A((e) => !e), M = k ? l : c;
	return /* @__PURE__ */ s("div", {
		className: a(u.expandableActionPanel, f),
		"data-ui": "expandable-action-panel",
		"data-open": k ? "" : void 0,
		children: [/* @__PURE__ */ o(e, {
			className: m,
			icon: /* @__PURE__ */ o(M, {}),
			title: k ? b : y,
			disabled: _,
			variant: "neutralOutline",
			"aria-expanded": k,
			"aria-controls": D,
			"data-ui": "expandable-action-panel-toggle",
			"data-action": k ? "collapse-action-panel" : "expand-action-panel",
			onClick: j
		}), k && /* @__PURE__ */ o("div", {
			id: D,
			role: "group",
			"aria-label": x,
			className: a(u.content, p),
			children: /* @__PURE__ */ o(t, {
				className: u.contentScroller,
				itemSelector: S,
				scrollPadding: C,
				smooth: w,
				children: d
			})
		})]
	});
}
//#endregion
//#region src/expandable-action-panel/LabeledExpandableActionPanel.tsx
function f({ label: e, className: t, labelClassName: n, labelStyle: r, labelMinWidth: i = "12em", panelClassName: c, open: l, defaultOpen: f, ...p }) {
	let m = {
		...r,
		minWidth: i
	}, h = typeof e == "string" ? e : void 0;
	return /* @__PURE__ */ s("div", {
		className: a(u.labeledPanel, t),
		"data-ui": "labeled-expandable-action-panel",
		children: [/* @__PURE__ */ o("div", {
			className: a("flexEllipsis", u.label, n),
			style: m,
			title: h,
			children: e
		}), /* @__PURE__ */ o(d, {
			...p,
			open: l,
			defaultOpen: f,
			className: a(u.labeledActionPanel, c)
		})]
	});
}
//#endregion
export { d as ExpandableActionPanel, f as LabeledExpandableActionPanel };

//# sourceMappingURL=index.js.map