"use client";
import { useProps } from "../../core/MantineProvider/use-props/use-props.mjs";
import { Popover } from "../Popover/Popover.mjs";
import { HoverCardContext } from "./HoverCard.context.mjs";
import { HoverCardGroup } from "./HoverCardGroup/HoverCardGroup.mjs";
import { HoverCardDropdown } from "./HoverCardDropdown/HoverCardDropdown.mjs";
import { HoverCardTarget } from "./HoverCardTarget/HoverCardTarget.mjs";
import { useHoverCard } from "./use-hover-card.mjs";
import { jsx } from "react/jsx-runtime";
//#region packages/@mantine/core/src/components/HoverCard/HoverCard.tsx
const defaultProps = {
	openDelay: 0,
	closeDelay: 150,
	initiallyOpened: false
};
function HoverCard(props) {
	const { children, onOpen, onClose, openDelay, closeDelay, initiallyOpened, ...others } = useProps("HoverCard", defaultProps, props);
	const hoverCard = useHoverCard({
		openDelay,
		closeDelay,
		defaultOpened: initiallyOpened,
		onOpen,
		onClose
	});
	return /* @__PURE__ */ jsx(HoverCardContext, {
		value: {
			openDropdown: hoverCard.openDropdown,
			closeDropdown: hoverCard.closeDropdown,
			getReferenceProps: hoverCard.getReferenceProps,
			getFloatingProps: hoverCard.getFloatingProps,
			reference: hoverCard.reference,
			floating: hoverCard.floating
		},
		children: /* @__PURE__ */ jsx(Popover, {
			...others,
			opened: hoverCard.opened,
			__staticSelector: "HoverCard",
			children
		})
	});
}
HoverCard.displayName = "@mantine/core/HoverCard";
HoverCard.Target = HoverCardTarget;
HoverCard.Dropdown = HoverCardDropdown;
HoverCard.Group = HoverCardGroup;
HoverCard.extend = (input) => input;
//#endregion
export { HoverCard };

//# sourceMappingURL=HoverCard.mjs.map