"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { SignaturePadProvider } from "./use-signature-pad-context.js";
import { useSignaturePad } from "./use-signature-pad.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/signature-pad/signature-pad-root.tsx
var splitRootProps = createSplitProps();
var SignaturePadRoot = forwardRef((props, ref) => {
	const [useSignaturePadProps, localProps] = splitRootProps(props, [
		"id",
		"ids",
		"defaultPaths",
		"drawing",
		"disabled",
		"readOnly",
		"name",
		"onDraw",
		"onDrawEnd",
		"paths",
		"readOnly",
		"required",
		"translations"
	]);
	const signaturePad = useSignaturePad(useSignaturePadProps);
	const mergedProps = mergeProps(signaturePad.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(SignaturePadProvider, {
		value: signaturePad,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
SignaturePadRoot.displayName = "SignaturePadRoot";
//#endregion
export { SignaturePadRoot };
