"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_factory = require("../factory.cjs");
const require_use_editable_context = require("./use-editable-context.cjs");
const require_use_editable = require("./use-editable.cjs");
let react = require("react");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/editable/editable-root.tsx
var splitRootProps = require_create_split_props.createSplitProps();
var EditableRoot = (0, react.forwardRef)((props, ref) => {
	const [useEditableProps, localProps] = splitRootProps(props, [
		"activationMode",
		"autoResize",
		"defaultEdit",
		"defaultValue",
		"disabled",
		"edit",
		"finalFocusEl",
		"form",
		"id",
		"ids",
		"invalid",
		"maxLength",
		"name",
		"onEditChange",
		"onFocusOutside",
		"onInteractOutside",
		"onPointerDownOutside",
		"onValueChange",
		"onValueCommit",
		"onValueRevert",
		"placeholder",
		"readOnly",
		"required",
		"selectOnFocus",
		"submitMode",
		"translations",
		"value"
	]);
	const editable = require_use_editable.useEditable(useEditableProps);
	const mergedProps = (0, _zag_js_react.mergeProps)(editable.getRootProps(), localProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_editable_context.EditableProvider, {
		value: editable,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.ark.div, {
			...mergedProps,
			ref
		})
	});
});
EditableRoot.displayName = "EditableRoot";
//#endregion
exports.EditableRoot = EditableRoot;
