"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));

var _propTypes = _interopRequireDefault(require("prop-types"));

var React = _interopRequireWildcard(require("react"));

var _styledComponents = _interopRequireWildcard(require("styled-components"));

var _reactTooltip = _interopRequireDefault(require("react-tooltip"));

function _templateObject() {
  var data = (0, _taggedTemplateLiteral2.default)(["\n  .__react_component_tooltip {\n    border-radius: 3px;\n    display: inline-block;\n    font-size: 13px;\n    left: -999em;\n    opacity: 0;\n    padding: 8px 21px;\n    position: fixed;\n    pointer-events: none;\n    transition: opacity 0.3s ease-out;\n    top: -999em;\n    visibility: hidden;\n    z-index: 999;\n\n    &::before,\n    &::after {\n      content: \"\";\n      width: 0;\n      height: 0;\n      position: absolute;\n    }\n\n    &.show {\n      opacity: 0.9;\n      margin-top: 0;\n      margin-left: 0;\n      visibility: visible;\n    }\n\n    &.place-top {\n      margin-top: -10px;\n\n      &::before {\n        border-left: 10px solid transparent;\n        border-right: 10px solid transparent;\n        bottom: -8px;\n        left: 50%;\n        margin-left: -10px;\n      }\n\n      &::after {\n        border-left: 8px solid transparent;\n        border-right: 8px solid transparent;\n        bottom: -6px;\n        left: 50%;\n        margin-left: -8px;\n      }\n    }\n\n    &.place-bottom {\n      margin-top: 10px;\n\n      &::before {\n        border-left: 10px solid transparent;\n        border-right: 10px solid transparent;\n        top: -8px;\n        left: 50%;\n        margin-left: -10px;\n      }\n\n      &::after {\n        border-left: 8px solid transparent;\n        border-right: 8px solid transparent;\n        top: -6px;\n        left: 50%;\n        margin-left: -8px;\n      }\n    }\n\n    &.place-left {\n      margin-left: -10px;\n\n      &::before {\n        border-top: 6px solid transparent;\n        border-bottom: 6px solid transparent;\n        right: -8px;\n        top: 50%;\n        margin-top: -5px;\n      }\n\n      &::after {\n        border-top: 5px solid transparent;\n        border-bottom: 5px solid transparent;\n        right: -6px;\n        top: 50%;\n        margin-top: -4px;\n      }\n    }\n\n    &.place-right {\n      margin-left: 10px;\n\n      &::before {\n        border-top: 6px solid transparent;\n        border-bottom: 6px solid transparent;\n        left: -8px;\n        top: 50%;\n        margin-top: -5px;\n      }\n\n      &::after {\n        border-top: 5px solid transparent;\n        border-bottom: 5px solid transparent;\n        left: -6px;\n        top: 50%;\n        margin-top: -4px;\n      }\n    }\n\n    .multi-line {\n      display: block;\n      padding: 2px 0;\n      text-align: center;\n    }\n  }\n"]);

  _templateObject = function _templateObject() {
    return data;
  };

  return data;
}

(0, _styledComponents.injectGlobal)(_templateObject());
var StyledTip =
/*#__PURE__*/
(0, _styledComponents.default)(_reactTooltip.default).withConfig({
  componentId: "sc-1swud5y-0"
})(["\n  color: ", " !important;\n  border: 1px solid ", " !important;\n  background-color: ", " !important;\n  cursor: pointer;\n  max-width: 350px;\n  font-family: ", ";\n  font-size: 0.8rem;\n  font-weight: 400;\n  z-index: 5;\n  text-transform: none;\n  text-align: left;\n  pointer-events: auto !important;\n\n  &:hover {\n    visibility: visible !important;\n    opacity: 1 !important;\n  }\n\n  &.place-top {\n    &::before {\n      border-top-color: ", " !important;\n    }\n\n    &::after {\n      border-top-color: ", " !important;\n    }\n  }\n\n  &.place-left {\n    &::before {\n      border-left-color: ", " !important;\n    }\n\n    &::after {\n      border-left-color: ", " !important;\n    }\n  }\n\n  &.place-bottom {\n    &::before {\n      border-bottom-color: ", " !important;\n    }\n\n    &::after {\n      border-bottom-color: ", " !important;\n    }\n  }\n\n  &.place-right {\n    &::before {\n      border-right-color: ", " !important;\n    }\n\n    &::after {\n      border-right-color: ", " !important;\n    }\n  }\n"], function (props) {
  return props.theme['tooltipColor'];
}, function (props) {
  return props.theme['tooltipBorderColor'];
}, function (props) {
  return props.theme['tooltipBackgroundColor'];
}, function (props) {
  return props.theme['fontPrimary'];
}, function (props) {
  return props.theme['tooltipBorderColor'];
}, function (props) {
  return props.theme['tooltipBackgroundColor'];
}, function (props) {
  return props.theme['tooltipBorderColor'];
}, function (props) {
  return props.theme['tooltipBackgroundColor'];
}, function (props) {
  return props.theme['tooltipBorderColor'];
}, function (props) {
  return props.theme['tooltipBackgroundColor'];
}, function (props) {
  return props.theme['tooltipBorderColor'];
}, function (props) {
  return props.theme['tooltipBackgroundColor'];
});

var Tooltip = function Tooltip(props) {
  var id = props.id,
      children = props.children,
      rest = (0, _objectWithoutProperties2.default)(props, ["id", "children"]);
  return React.createElement(StyledTip, (0, _extends2.default)({
    border: true,
    delayHide: 250,
    effect: "solid",
    id: id,
    type: "light"
  }, rest), children);
};

Tooltip.propTypes = process.env.NODE_ENV !== "production" ? {
  children: _propTypes.default.node.isRequired,
  id: _propTypes.default.string.isRequired
} : {};
var _default = Tooltip;
exports.default = _default;