function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

/*
Copyright (c) 2018-2019 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/

/* eslint-disable react/no-find-dom-node */
import * as React from 'react';
import { Popover } from '../popover/index.js';
import { mergeOverrides } from '../helpers/overrides.js';
import baseDefaultProps from './default-props.js';
import { Arrow as StyledArrow, Body as StyledBody, Inner as StyledInner } from './styled-components.js';

class Tooltip extends React.Component {
  render() {
    const overrides = mergeOverrides({
      Arrow: StyledArrow,
      Body: StyledBody,
      Inner: StyledInner
    }, this.props.overrides);
    return React.createElement(Popover, _extends({
      "data-baseweb": "tooltip"
    }, this.props, {
      overrides: overrides
    }));
  }

}

_defineProperty(Tooltip, "defaultProps", { ...baseDefaultProps
});

export default Tooltip;