"use client";
const require_create_event_handler = require("../../../core/utils/create-event-handler/create-event-handler.cjs");
const require_use_props = require("../../../core/MantineProvider/use-props/use-props.cjs");
const require_Popover = require("../../Popover/Popover.cjs");
const require_HoverCard_context = require("../HoverCard.context.cjs");
const require_HoverCardGroup = require("../HoverCardGroup/HoverCardGroup.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region packages/@mantine/core/src/components/HoverCard/HoverCardDropdown/HoverCardDropdown.tsx
function HoverCardDropdown(props) {
	const { children, onMouseEnter, onMouseLeave, ...others } = require_use_props.useProps("HoverCardDropdown", null, props);
	const ctx = require_HoverCard_context.useHoverCardContext();
	if ((0, react.use)(require_HoverCardGroup.HoverCardGroupContext).withinGroup && ctx.getFloatingProps && ctx.floating) {
		const floatingProps = ctx.getFloatingProps();
		return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Popover.Popover.Dropdown, {
			ref: ctx.floating,
			...floatingProps,
			onMouseEnter: require_create_event_handler.createEventHandler(onMouseEnter, floatingProps.onMouseEnter),
			onMouseLeave: require_create_event_handler.createEventHandler(onMouseLeave, floatingProps.onMouseLeave),
			...others,
			children
		});
	}
	const handleMouseEnter = require_create_event_handler.createEventHandler(onMouseEnter, ctx.openDropdown);
	const handleMouseLeave = require_create_event_handler.createEventHandler(onMouseLeave, ctx.closeDropdown);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Popover.Popover.Dropdown, {
		onMouseEnter: handleMouseEnter,
		onMouseLeave: handleMouseLeave,
		...others,
		children
	});
}
HoverCardDropdown.displayName = "@mantine/core/HoverCardDropdown";
//#endregion
exports.HoverCardDropdown = HoverCardDropdown;

//# sourceMappingURL=HoverCardDropdown.cjs.map