"use client";
import { createSplitProps } from "../../utils/create-split-props.js";
import { ark } from "../factory.js";
import { SplitterProvider } from "./use-splitter-context.js";
import { useSplitter } from "./use-splitter.js";
import { forwardRef } from "react";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/splitter/splitter-root.tsx
var splitRootProps = createSplitProps();
var SplitterRoot = forwardRef((props, ref) => {
	const [useSplitterProps, localProps] = splitRootProps(props, [
		"defaultSize",
		"id",
		"ids",
		"keyboardResizeBy",
		"nonce",
		"onCollapse",
		"onExpand",
		"onResize",
		"onResizeEnd",
		"onResizeStart",
		"orientation",
		"panels",
		"registry",
		"size"
	]);
	const splitter = useSplitter(useSplitterProps);
	const mergedProps = mergeProps(splitter.getRootProps(), localProps);
	return /* @__PURE__ */ jsx(SplitterProvider, {
		value: splitter,
		children: /* @__PURE__ */ jsx(ark.div, {
			...mergedProps,
			ref
		})
	});
});
SplitterRoot.displayName = "SplitterRoot";
//#endregion
export { SplitterRoot };
