"use client";
import { checkboxAnatomy } from "./checkbox.anatomy.js";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { useCheckboxGroup } from "./use-checkbox-group.js";
import { CheckboxGroupContextProvider } from "./use-checkbox-group-context.js";
import { forwardRef } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/components/checkbox/checkbox-group.tsx
var splitGroupProps = createSplitProps();
var CheckboxGroup = forwardRef((props, ref) => {
	const [checkboxGroupProps, localProps] = splitGroupProps(props, [
		"defaultValue",
		"value",
		"onValueChange",
		"disabled",
		"invalid",
		"readOnly",
		"name",
		"maxSelectedValues"
	]);
	return /* @__PURE__ */ jsx(CheckboxGroupContextProvider, {
		value: useCheckboxGroup(checkboxGroupProps),
		children: /* @__PURE__ */ jsx(ark.div, {
			ref,
			role: "group",
			...localProps,
			...checkboxAnatomy.build().group.attrs
		})
	});
});
CheckboxGroup.displayName = "CheckboxGroup";
//#endregion
export { CheckboxGroup };
