import { t as e } from "./ui.module-BisoTevy.js";
import { n as t } from "./uiClasses-BNjBunnY.js";
import { t as n } from "./CheckBox.module-C5SjPwSj.js";
import { useId as r } from "react";
import { cn as i } from "@ryuzaki13/react-foundation-lib/utils";
import { MinusIcon as a, SquareIcon as o } from "lucide-react";
import { jsx as s, jsxs as c } from "react/jsx-runtime";
//#region src/check-box/CheckBox.tsx
function l({ label: l, description: u, placeholder: d, disabled: f, size: p, className: m, onChange: h, value: g, noWrap: _, id: v, tone: y = "neutral", indeterminate: b = !1, ...x }) {
	let S = r(), C = v ?? S, w = u ? `${C}-description` : void 0, T = l ?? d, E = g ?? !1, D = (e) => {
		e && (e.indeterminate = b);
	};
	return /* @__PURE__ */ c("div", {
		className: i(e.uiElement, p && e.uiSizable, p && e[p], f && e.disabled, m),
		"aria-disabled": f || void 0,
		children: [/* @__PURE__ */ c("div", {
			className: n.row,
			children: [/* @__PURE__ */ c("div", {
				className: i(n.wrapper, t(y)),
				children: [/* @__PURE__ */ s("input", {
					...x,
					ref: D,
					id: C,
					type: "checkbox",
					checked: E,
					disabled: f,
					"aria-checked": b ? "mixed" : E,
					"aria-describedby": w,
					className: i(e.uiSelectionControl, n.input, b && n.inputIndeterminate),
					onChange: () => h?.(!E)
				}), /* @__PURE__ */ s("div", {
					className: i(e.uiSelectionIcon, n.icon),
					"aria-hidden": "true",
					children: s(b ? a : o, {})
				})]
			}), T && /* @__PURE__ */ s("label", {
				htmlFor: C,
				className: i(e.uiLabelBase, _ && "textNoWrap"),
				children: T
			})]
		}), u && /* @__PURE__ */ s("p", {
			id: w,
			className: e.uiDescription,
			children: u
		})]
	});
}
//#endregion
export { l as t };

//# sourceMappingURL=check-box-Dd3YFuxd.js.map