"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 { HoverCardProvider } from "./use-hover-card-context.js";
import { useHoverCard } from "./use-hover-card.js";
import { mergeProps } from "@zag-js/react";
import { jsx } from "react/jsx-runtime";
//#region src/components/hover-card/hover-card-root.tsx
var HoverCardRoot = (props) => {
	const [presenceProps, { children, ...localProps }] = splitPresenceProps(props);
	const hoverCard = useHoverCard(localProps);
	return /* @__PURE__ */ jsx(HoverCardProvider, {
		value: hoverCard,
		children: /* @__PURE__ */ jsx(PresenceProvider, {
			value: usePresence(mergeProps({ present: hoverCard.open }, presenceProps)),
			children
		})
	});
};
//#endregion
export { HoverCardRoot };
