"use client";
import { splitPresenceProps } from "../presence/split-presence-props.js";
import { usePresence } from "../presence/use-presence.js";
import { PresenceProvider } from "../presence/use-presence-context.js";
import { TooltipProvider } from "./use-tooltip-context.js";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/tooltip/tooltip-root-provider.tsx
var TooltipRootProvider = (props) => {
	const [presenceProps, { value: tooltip, children }] = splitPresenceProps(props);
	return /* @__PURE__ */ jsx(TooltipProvider, {
		value: tooltip,
		children: /* @__PURE__ */ jsx(PresenceProvider, {
			value: usePresence(mergeProps({ present: tooltip.open }, presenceProps)),
			children
		})
	});
};
//#endregion
export { TooltipRootProvider };
