'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _cspaceLayout = require('cspace-layout');

var _MiniViewContainer = require('../../containers/record/MiniViewContainer');

var _MiniViewContainer2 = _interopRequireDefault(_MiniViewContainer);

var _MiniView = require('./MiniView');

var _MiniView2 = _interopRequireDefault(_MiniView);

var _MiniViewPopup = require('../../../styles/cspace-ui/MiniViewPopup.css');

var _MiniViewPopup2 = _interopRequireDefault(_MiniViewPopup);

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

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

var propTypes = Object.assign({}, _cspaceLayout.Popup.propTypes, _MiniView2.default.propTypes, {
  style: _propTypes2.default.object,
  domRef: _propTypes2.default.func
});

function MiniViewPopup(props) {
  var onMouseEnter = props.onMouseEnter,
      style = props.style,
      domRef = props.domRef,
      remainingProps = _objectWithoutProperties(props, ['onMouseEnter', 'style', 'domRef']);

  return _react2.default.createElement(
    'div',
    {
      className: _MiniViewPopup2.default.common,
      ref: domRef,
      style: style,
      onMouseEnter: onMouseEnter
    },
    _react2.default.createElement(
      _cspaceLayout.Popup,
      null,
      _react2.default.createElement(_MiniViewContainer2.default, remainingProps)
    )
  );
}

MiniViewPopup.propTypes = propTypes;