"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { ImageCropperProvider } from "./use-image-cropper-context.js";
import { useImageCropper } from "./use-image-cropper.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/image-cropper/image-cropper-root.tsx
var splitRootProps = createSplitProps();
var ImageCropperRoot = forwardRef((props, ref) => {
	const [useImageCropperProps, localProps] = splitRootProps(props, [
		"aspectRatio",
		"cropShape",
		"defaultFlip",
		"defaultRotation",
		"defaultZoom",
		"fixedCropArea",
		"flip",
		"id",
		"ids",
		"initialCrop",
		"maxHeight",
		"maxWidth",
		"maxZoom",
		"minHeight",
		"minWidth",
		"minZoom",
		"nudgeStep",
		"nudgeStepCtrl",
		"nudgeStepShift",
		"onCropChange",
		"onFlipChange",
		"onRotationChange",
		"onZoomChange",
		"rotation",
		"translations",
		"zoom",
		"zoomSensitivity",
		"zoomStep"
	]);
	const imageCropper = useImageCropper(useImageCropperProps);
	const mergedProps = mergeProps(imageCropper.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(ImageCropperProvider, {
		value: imageCropper,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
ImageCropperRoot.displayName = "ImageCropperRoot";
//#endregion
export { ImageCropperRoot };
