'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var makeCircle = function makeCircle(radius, color) {
  return {
    width: radius,
    height: radius,
    backgroundColor: color,
    borderRadius: radius / 2,
    cursor: 'pointer',
    position: 'absolute',
    bottom: radius / 2,
    right: radius / 2
  };
};

var Record = function Record(_ref) {
  var getRecordingStatus = _ref.getRecordingStatus;
  var _onClick = _ref.onClick;
  var onMouseOver = _ref.onMouseOver;
  var onMouseOut = _ref.onMouseOut;
  var hovered = _ref.hovered;

  var style = makeCircle(50, 'gainsboro');
  style.boxShadow = '2px 2px 5px #888888';
  var innerCirlcleStyle = makeCircle(25, 'red');
  if (!hovered) {
    innerCirlcleStyle.opacity = 0.3;
  }
  return _react2.default.createElement(
    'div',
    {
      onMouseOver: onMouseOver,
      onMouseOut: onMouseOut,
      style: style,
      onClick: function onClick() {
        return _onClick(getRecordingStatus());
      }
    },
    _react2.default.createElement('div', { style: innerCirlcleStyle })
  );
};

exports.default = Record;