"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { RatingGroupProvider } from "./use-rating-group-context.js";
import { useRatingGroup } from "./use-rating-group.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/rating-group/rating-group-root.tsx
var splitRootProps = createSplitProps();
var RatingGroupRoot = forwardRef((props, ref) => {
	const [useRatingProps, localProps] = splitRootProps(props, [
		"allowHalf",
		"autoFocus",
		"count",
		"defaultValue",
		"disabled",
		"form",
		"id",
		"ids",
		"name",
		"onHoverChange",
		"onValueChange",
		"readOnly",
		"required",
		"translations",
		"value"
	]);
	const ratingGroup = useRatingGroup(useRatingProps);
	const mergedProps = mergeProps(ratingGroup.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(RatingGroupProvider, {
		value: ratingGroup,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
RatingGroupRoot.displayName = "RatingGroupRoot";
//#endregion
export { RatingGroupRoot };
