"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { ClipboardProvider } from "./use-clipboard-context.js";
import { useClipboard } from "./use-clipboard.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/clipboard/clipboard-root.tsx
var splitRootProps = createSplitProps();
var ClipboardRoot = forwardRef((props, ref) => {
	const [useClipboardProps, localProps] = splitRootProps(props, [
		"defaultValue",
		"id",
		"ids",
		"onStatusChange",
		"onValueChange",
		"timeout",
		"translations",
		"value"
	]);
	const clipboard = useClipboard(useClipboardProps);
	const mergedProps = mergeProps(clipboard.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(ClipboardProvider, {
		value: clipboard,
		children: /* @__PURE__ */ jsx(ark.div, {
			ref,
			...mergedProps
		})
	});
});
ClipboardRoot.displayName = "ClipboardRoot";
//#endregion
export { ClipboardRoot };
