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

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