"use client";
const require_create_split_props = require("../../utils/create-split-props.cjs");
const require_split_presence_props = require("../presence/split-presence-props.cjs");
const require_use_presence = require("../presence/use-presence.cjs");
const require_use_presence_context = require("../presence/use-presence-context.cjs");
const require_use_floating_panel_context = require("./use-floating-panel-context.cjs");
const require_use_floating_panel = require("./use-floating-panel.cjs");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/floating-panel/floating-panel-root.tsx
var splitRootProps = require_create_split_props.createSplitProps();
var FloatingPanelRoot = (props) => {
	const [presenceProps, otherProps] = require_split_presence_props.splitPresenceProps(props);
	const [useFloatingPanelProps, localProps] = splitRootProps(otherProps, [
		"allowOverflow",
		"closeOnEscape",
		"defaultOpen",
		"defaultPosition",
		"defaultSize",
		"dir",
		"disabled",
		"draggable",
		"getAnchorPosition",
		"getBoundaryEl",
		"gridSize",
		"finalFocusEl",
		"id",
		"ids",
		"initialFocusEl",
		"lockAspectRatio",
		"maxSize",
		"minSize",
		"onOpenChange",
		"onPositionChange",
		"onPositionChangeEnd",
		"onSizeChange",
		"onSizeChangeEnd",
		"onStageChange",
		"open",
		"persistRect",
		"position",
		"resizable",
		"restoreFocus",
		"size",
		"strategy",
		"translations"
	]);
	const floatingPanel = require_use_floating_panel.useFloatingPanel(useFloatingPanelProps);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_floating_panel_context.FloatingPanelProvider, {
		value: floatingPanel,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_presence_context.PresenceProvider, {
			value: require_use_presence.usePresence((0, _zag_js_react.mergeProps)({ present: floatingPanel.open }, presenceProps)),
			children: localProps.children
		})
	});
};
//#endregion
exports.FloatingPanelRoot = FloatingPanelRoot;
