"use client";
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_popover_context = require("./use-popover-context.cjs");
let _zag_js_react = require("@zag-js/react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/popover/popover-root-provider.tsx
var PopoverRootProvider = (props) => {
	const [presenceProps, { value: popover, children }] = require_split_presence_props.splitPresenceProps(props);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_popover_context.PopoverProvider, {
		value: popover,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_use_presence_context.PresenceProvider, {
			value: require_use_presence.usePresence((0, _zag_js_react.mergeProps)({ present: popover.open }, presenceProps)),
			children
		})
	});
};
//#endregion
exports.PopoverRootProvider = PopoverRootProvider;
