"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { AngleSliderProvider } from "./use-angle-slider-context.js";
import { useAngleSlider } from "./use-angle-slider.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/angle-slider/angle-slider-root.tsx
var splitRootProps = createSplitProps();
var AngleSliderRoot = forwardRef((props, ref) => {
	const [useAngleSliderProps, localProps] = splitRootProps(props, [
		"id",
		"ids",
		"name",
		"invalid",
		"readOnly",
		"disabled",
		"onValueChangeEnd",
		"onValueChange",
		"defaultValue",
		"value",
		"step",
		"aria-label",
		"aria-labelledby"
	]);
	const angleSlider = useAngleSlider(useAngleSliderProps);
	const mergedProps = mergeProps(angleSlider.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(AngleSliderProvider, {
		value: angleSlider,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
AngleSliderRoot.displayName = "AngleSliderRoot";
//#endregion
export { AngleSliderRoot };
