import { n as e } from "../chunks/button-BU2kRzwu.js";
import { l as t } from "../chunks/misc-BYxxlJz6.js";
import { useCallback as n, useId as r, useState as i } from "react";
import { cn as a } from "@ryuzaki13/react-foundation-lib/utils";
import { ChevronsLeftIcon as o, ChevronsRightIcon as s } from "lucide-react";
import { jsx as c, jsxs as l } from "react/jsx-runtime";
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 ? s : o;
	return /* @__PURE__ */ l("div", {
		className: a(u.expandableActionPanel, f),
		"data-ui": "expandable-action-panel",
		"data-open": k ? "" : void 0,
		children: [/* @__PURE__ */ c(e, {
			className: m,
			icon: /* @__PURE__ */ c(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__ */ c("div", {
			id: D,
			role: "group",
			"aria-label": x,
			className: a(u.content, p),
			children: /* @__PURE__ */ c(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: o, open: s, defaultOpen: f, ...p }) {
	let m = {
		...r,
		minWidth: i
	}, h = typeof e == "string" ? e : void 0;
	return /* @__PURE__ */ l("div", {
		className: a(u.labeledPanel, t),
		"data-ui": "labeled-expandable-action-panel",
		children: [/* @__PURE__ */ c("div", {
			className: a("flexEllipsis", u.label, n),
			style: m,
			title: h,
			children: e
		}), /* @__PURE__ */ c(d, {
			...p,
			open: s,
			defaultOpen: f,
			className: a(u.labeledActionPanel, o)
		})]
	});
}
//#endregion
export { d as ExpandableActionPanel, f as LabeledExpandableActionPanel };

//# sourceMappingURL=index.js.map