"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { ColorPickerAreaPropsProvider } from "./use-color-picker-area-props-context.js";
import { useColorPickerContext } from "./use-color-picker-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-area.tsx
var splitAreaProps = createSplitProps();
var ColorPickerArea = forwardRef((props, ref) => {
	const [areaProps, localProps] = splitAreaProps(props, ["xChannel", "yChannel"]);
	const mergedProps = mergeProps(useColorPickerContext().getAreaProps(areaProps), localProps);
	return /* @__PURE__ */ jsx(ColorPickerAreaPropsProvider, {
		value: areaProps,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
ColorPickerArea.displayName = "ColorPickerArea";
//#endregion
export { ColorPickerArea };
