"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-runtime");
const RadixTooltip = require("@radix-ui/react-tooltip");
const React = require("react");
const classNames = require("../../utils/classNames.cjs");
require("../../utils/globals.cjs");
const config_context = require("../config/config.context.cjs");
require("./tooltip.theme.css.cjs");
function _interopNamespaceDefault(e) {
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
  if (e) {
    for (const k in e) {
      if (k !== "default") {
        const d = Object.getOwnPropertyDescriptor(e, k);
        Object.defineProperty(n, k, d.get ? d : {
          enumerable: true,
          get: () => e[k]
        });
      }
    }
  }
  n.default = e;
  return Object.freeze(n);
}
const RadixTooltip__namespace = /* @__PURE__ */ _interopNamespaceDefault(RadixTooltip);
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
const Tooltip = React__namespace.forwardRef(({ children, content, delay, open, onOpenChange, showArrow, className, arrowClassName, side, ...props }, ref) => {
  const { tooltipDelay, tooltipShowArrow, tooltipSide } = config_context.useArmstrongConfig({
    tooltipDelay: delay,
    tooltipShowArrow: showArrow,
    tooltipSide: side
  });
  return jsxRuntime.jsx(RadixTooltip__namespace.Provider, { delayDuration: tooltipDelay, children: jsxRuntime.jsxs(RadixTooltip__namespace.Root, { open, onOpenChange, children: [jsxRuntime.jsx(RadixTooltip__namespace.Trigger, { asChild: true, children }), jsxRuntime.jsx(RadixTooltip__namespace.Portal, { children: jsxRuntime.jsxs(RadixTooltip__namespace.Content, { ref, className: classNames.concat(className, "arm-tooltip-content"), side: tooltipSide, ...props, children: [content, tooltipShowArrow && jsxRuntime.jsx(RadixTooltip__namespace.Arrow, { className: classNames.concat(arrowClassName, "arm-tooltip-arrow") })] }) })] }) });
});
Tooltip.displayName = "Tooltip";
Tooltip.defaultProps = {
  sideOffset: 5
};
exports.Tooltip = Tooltip;
//# sourceMappingURL=tooltip.component.cjs.map
