"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactstrap = require("reactstrap");
var _classnames = _interopRequireDefault(require("classnames"));
require("./index.css");
const Tooltip = _ref => {
  let {
    target,
    children,
    className,
    modifiers = [],
    placement = 'bottom',
    fade = false,
    delay = 0
  } = _ref;
  const hasBoundary = modifiers.find(item => item.name === 'preventOverflow');
  const newModifiers = hasBoundary ? modifiers : [...modifiers, {
    name: 'preventOverflow',
    options: {
      boundary: window.document.body
    }
  }];
  const props = {
    target,
    placement,
    popperClassName: (0, _classnames.default)('sf-tooltip', className),
    delay,
    hideArrow: true,
    autoHide: false,
    fade,
    modifiers: newModifiers
  };
  return /*#__PURE__*/_react.default.createElement(_reactstrap.UncontrolledTooltip, props, children);
};
var _default = exports.default = Tooltip;