"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
require("react");
require("clsx");
const useProps = require("../../core/MantineProvider/use-props/use-props.cjs");
const useDelayedHover = require("../Floating/use-delayed-hover.cjs");
const Popover = require("../Popover/Popover.cjs");
const HoverCard_context = require("./HoverCard.context.cjs");
const HoverCardDropdown = require("./HoverCardDropdown/HoverCardDropdown.cjs");
const HoverCardTarget = require("./HoverCardTarget/HoverCardTarget.cjs");
const useDisclosure = require("../../../../../../../@mantine_hooks@7.15.2_react@18.3.1/node_modules/@mantine/hooks/esm/use-disclosure/use-disclosure.cjs");
const defaultProps = {
  openDelay: 0,
  closeDelay: 150,
  initiallyOpened: false
};
function HoverCard(props) {
  const { children, onOpen, onClose, openDelay, closeDelay, initiallyOpened, ...others } = useProps.useProps(
    "HoverCard",
    defaultProps,
    props
  );
  const [opened, { open, close }] = useDisclosure.useDisclosure(initiallyOpened, { onClose, onOpen });
  const { openDropdown, closeDropdown } = useDelayedHover.useDelayedHover({ open, close, openDelay, closeDelay });
  return /* @__PURE__ */ jsxRuntime.jsx(HoverCard_context.HoverCardContextProvider, { value: { openDropdown, closeDropdown }, children: /* @__PURE__ */ jsxRuntime.jsx(Popover.Popover, { ...others, opened, __staticSelector: "HoverCard", children }) });
}
HoverCard.displayName = "@mantine/core/HoverCard";
HoverCard.Target = HoverCardTarget.HoverCardTarget;
HoverCard.Dropdown = HoverCardDropdown.HoverCardDropdown;
HoverCard.extend = (input) => input;
exports.HoverCard = HoverCard;
