"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_factory = require("../factory.cjs");
const require_use_checkbox_context = require("./use-checkbox-context.cjs");
const require_use_checkbox = require("./use-checkbox.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/checkbox/checkbox-root.tsx
var splitRootProps = require_create_split_props.createSplitProps();
var CheckboxRoot = (0, react.forwardRef)((props, ref) => {
	const [useCheckboxProps, localProps] = splitRootProps(props, [
		"checked",
		"defaultChecked",
		"disabled",
		"form",
		"id",
		"ids",
		"invalid",
		"name",
		"onCheckedChange",
		"readOnly",
		"required",
		"value"
	]);
	const checkbox = require_use_checkbox.useCheckbox(useCheckboxProps);
	const mergedProps = (0, _zag_js_react.mergeProps)(checkbox.getRootProps(), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_checkbox_context.CheckboxProvider, {
		value: checkbox,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.label, {
			...mergedProps,
			ref
		})
	});
});
CheckboxRoot.displayName = "CheckboxRoot";
//#endregion
exports.CheckboxRoot = CheckboxRoot;
