import { jsx, jsxs } from "react/jsx-runtime";
import { forwardRef } from "react";
/* empty css                    */
import Tooltip$1 from "../../node_modules/@mui/material/Tooltip/Tooltip.js";
const getVariantClass = (variant) => {
  switch (variant) {
    case "secondary":
      return "secondary-tooltip";
    case "tertiary":
      return "tertiary-tooltip";
    case "feature":
      return "feature-tooltip";
    default:
      return "primary-tooltip";
  }
};
const Tooltip = forwardRef(
  ({
    title,
    description,
    orientation = "top",
    variant = "primary",
    children,
    isHoverEnabled = true,
    className,
    style: _style,
    "data-testid": _dataTestId,
    ...rest
  }, ref) => {
    const tooltipTitle = variant === "feature" ? /* @__PURE__ */ jsxs("span", { className: "impact-tooltip-feature-content", children: [
      /* @__PURE__ */ jsx("span", { className: "impact-tooltip-feature-title", children: title }),
      description ? /* @__PURE__ */ jsx("span", { className: "impact-tooltip-feature-description", children: description }) : null
    ] }) : title;
    return /* @__PURE__ */ jsx(
      Tooltip$1,
      {
        ref,
        arrow: true,
        classes: {
          popper: `impact-tooltip-container ${getVariantClass(variant)} ${className ?? ""}`.trim()
        },
        disableFocusListener: !isHoverEnabled,
        disableHoverListener: !isHoverEnabled,
        disableTouchListener: !isHoverEnabled,
        placement: orientation,
        PopperProps: {
          sx: {
            zIndex: 9999
          }
        },
        title: tooltipTitle,
        ...rest,
        children
      }
    );
  }
);
Tooltip.displayName = "Tooltip";
export {
  Tooltip
};
