"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { useColorPickerContext } from "./use-color-picker-context.js";
import { ColorPickerSwatchPropsProvider } from "./use-color-picker-swatch-props-context.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/color-picker/color-picker-swatch.tsx
var splitSwatchProps = createSplitProps();
var ColorPickerSwatch = forwardRef((props, ref) => {
	const [swatwchProps, localProps] = splitSwatchProps(props, ["respectAlpha", "value"]);
	const mergedProps = mergeProps(useColorPickerContext().getSwatchProps(swatwchProps), localProps);
	return /* @__PURE__ */ jsx(ColorPickerSwatchPropsProvider, {
		value: swatwchProps,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
ColorPickerSwatch.displayName = "ColorPickerSwatch";
//#endregion
export { ColorPickerSwatch };
