"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _tooltip = require("../tooltip");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const DropdownItemTooltip = ({
  children,
  option
}) => {
  const {
    tooltipPlacement,
    tooltipText,
    tooltipDocsLink,
    tooltipTestId,
    tooltipId
  } = option;
  const tooltipProps = {
    testId: tooltipTestId,
    content: tooltipText,
    placement: tooltipPlacement || _tooltip.TOOLTIP_PLACEMENT_TYPES.RIGHT,
    tooltipDelayType: _tooltip.TOOLTIP_DELAY_TYPES.SLOW,
    docsLink: tooltipDocsLink,
    tooltipId
  };
  if (!tooltipText) {
    return children;
  }
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
    ...tooltipProps,
    children: children
  });
};
var _default = exports.default = DropdownItemTooltip;