import { Label as e } from "../../atoms/label/Label.js";
import { Checkbox as t } from "../../atoms/checkbox/Checkbox.js";
import { ErrorMessage as n } from "../../atoms/error_message/ErrorMessage.js";
import { checkboxField as r, checkboxWrapper as i, helperText as a, labelWrapper as o } from "./checkboxField.css.js";
import "react";
import { jsx as s, jsxs as c } from "react/jsx-runtime";
//#region src/atomic/molecules/checkbox_field/CheckboxField.tsx
var l = (l) => {
	let { id: u, label: d, error: f, helperText: p, ...m } = l, h = `checkbox-${Math.random().toString(36).substring(2, 9)}`;
	u != null && u !== "" && (h = u);
	let g = null;
	p != null && p !== "" && (g = /* @__PURE__ */ s("div", {
		className: a,
		children: p
	}));
	let _ = null;
	f != null && f !== "" && (_ = /* @__PURE__ */ s(n, { children: f }));
	let v = null;
	return d != null && (v = /* @__PURE__ */ c("div", {
		className: o,
		children: [
			/* @__PURE__ */ s(e, {
				htmlFor: h,
				children: d
			}),
			g,
			_
		]
	})), /* @__PURE__ */ s("div", {
		className: r,
		children: /* @__PURE__ */ c("div", {
			className: i,
			children: [/* @__PURE__ */ s(t, {
				id: h,
				...m
			}), v]
		})
	});
};
//#endregion
export { l as CheckboxField };

//# sourceMappingURL=CheckboxField.js.map