"use strict";

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

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

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

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

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

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

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

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

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

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

var _styles = require("@material-ui/core/styles");

function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }

function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

var useStyles = (0, _styles.withStyles)(function (theme) {
  return {
    root: {
      position: 'relative',
      bottom: '5px',
      left: 0,
      width: '100%',
      background: theme.palette.common.white,
      display: 'inline-flex',
      padding: '5px',
      boxShadow: '0px 4px 4px rgba(0, 0, 0, 0.25)'
    },
    editContainer: {
      cursor: 'pointer',
      flex: 3,
      border: "solid ".concat(theme.palette.common.black),
      textAlign: 'right',
      borderWidth: '0 2px 0 0',
      marginRight: '5px',
      paddingRight: '5px'
    },
    removeContainer: {
      cursor: 'pointer'
    }
  };
});

var MediaToolbar = /*#__PURE__*/function (_React$Component) {
  (0, _inherits2["default"])(MediaToolbar, _React$Component);

  var _super = _createSuper(MediaToolbar);

  function MediaToolbar() {
    (0, _classCallCheck2["default"])(this, MediaToolbar);
    return _super.apply(this, arguments);
  }

  (0, _createClass2["default"])(MediaToolbar, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          classes = _this$props.classes,
          hideEdit = _this$props.hideEdit,
          onEdit = _this$props.onEdit,
          onRemove = _this$props.onRemove;
      return /*#__PURE__*/_react["default"].createElement("span", {
        className: classes.root
      }, hideEdit ? null : /*#__PURE__*/_react["default"].createElement("span", {
        className: classes.editContainer,
        onClick: onEdit
      }, "Edit Settings"), /*#__PURE__*/_react["default"].createElement("span", {
        className: classes.removeContainer,
        onClick: onRemove
      }, "Remove"));
    }
  }]);
  return MediaToolbar;
}(_react["default"].Component);

(0, _defineProperty2["default"])(MediaToolbar, "propTypes", {
  classes: _propTypes["default"].object,
  onEdit: _propTypes["default"].func,
  hideEdit: _propTypes["default"].bool,
  onRemove: _propTypes["default"].func
});

var _default = useStyles(MediaToolbar);

exports["default"] = _default;
//# sourceMappingURL=media-toolbar.js.map