import { jsx, jsxs } from "react/jsx-runtime";
import * as RadixTooltip from "@radix-ui/react-tooltip";
import * as React from "react";
import { concat } from "../../utils/classNames.js";
import "../../utils/globals.js";
import { useArmstrongConfig } from "../config/config.context.js";
import "./tooltip.theme.css.js";
const Tooltip = React.forwardRef(({ children, content, delay, open, onOpenChange, showArrow, className, arrowClassName, side, ...props }, ref) => {
  const { tooltipDelay, tooltipShowArrow, tooltipSide } = useArmstrongConfig({
    tooltipDelay: delay,
    tooltipShowArrow: showArrow,
    tooltipSide: side
  });
  return jsx(RadixTooltip.Provider, { delayDuration: tooltipDelay, children: jsxs(RadixTooltip.Root, { open, onOpenChange, children: [jsx(RadixTooltip.Trigger, { asChild: true, children }), jsx(RadixTooltip.Portal, { children: jsxs(RadixTooltip.Content, { ref, className: concat(className, "arm-tooltip-content"), side: tooltipSide, ...props, children: [content, tooltipShowArrow && jsx(RadixTooltip.Arrow, { className: concat(arrowClassName, "arm-tooltip-arrow") })] }) })] }) });
});
Tooltip.displayName = "Tooltip";
Tooltip.defaultProps = {
  sideOffset: 5
};
export {
  Tooltip
};
//# sourceMappingURL=tooltip.component.js.map
