"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { useSliderContext } from "./use-slider-context.js";
import { SliderThumbPropsProvider } from "./use-slider-thumb-props-context.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/slider/slider-thumb.tsx
var splitThumbProps = createSplitProps();
var SliderThumb = forwardRef((props, ref) => {
	const [thumbProps, localProps] = splitThumbProps(props, ["index", "name"]);
	const mergedProps = mergeProps(useSliderContext().getThumbProps(thumbProps), localProps);
	return /* @__PURE__ */ jsx(SliderThumbPropsProvider, {
		value: thumbProps,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
SliderThumb.displayName = "SliderThumb";
//#endregion
export { SliderThumb };
