"use strict";

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

var _react = _interopRequireDefault(require("react"));

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

var _reactSimpleTooltip = _interopRequireDefault(require("react-simple-tooltip"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var ToolTipComponent = function ToolTipComponent(props) {
  var tooltip = props.tooltip;
  return _react.default.createElement(_reactSimpleTooltip.default, {
    style: tooltip.style || {
      top: 35,
      height: '20px'
    },
    arrow: tooltip.arrow || 8,
    background: tooltip.background || '#000',
    border: tooltip.border || '#000',
    color: tooltip.color || '#FFF',
    content: _react.default.createElement("div", {
      style: tooltip.contentstyle || {
        width: '50px'
      }
    }, tooltip.content || 'Tool Tip'),
    fadeDuration: tooltip.fadeDuration || 0,
    fadeEasing: tooltip.fadeEasing || 'linear',
    fixed: tooltip.fixed || false,
    fontFamily: tooltip.fontFamily || 'inherit',
    fontSize: tooltip.fontSize || '0.7em',
    offset: tooltip.offset || 0,
    padding: tooltip.padding || 16,
    placement: tooltip.placement || 'right',
    radius: tooltip.radius || 5,
    zIndex: tooltip.zIndex || 50
  }, _react.default.createElement("img", {
    src: tooltip.imageurl || 'https://s3.amazonaws.com/geoviewer.io/img/icons8-info-48.png',
    alt: "",
    style: tooltip.imagestyle || {
      width: '20px',
      height: '20px'
    }
  }));
};

exports.ToolTipComponent = ToolTipComponent;
ToolTipComponent.propTypes = process.env.NODE_ENV !== "production" ? {
  tooltip: _propTypes.default.object
} : {};
ToolTipComponent.defaultProps = {
  tooltip: null
};
var _default = ToolTipComponent;
exports.default = _default;