"use strict";

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

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

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

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

var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));

var _Check = _interopRequireDefault(require("@material-ui/icons/Check"));

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

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

var _classnames = _interopRequireDefault(require("classnames"));

var RawDoneButton = function RawDoneButton(_ref) {
  var classes = _ref.classes,
      onClick = _ref.onClick,
      hideBackground = _ref.hideBackground;
  return /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
    "aria-label": "Done",
    className: classes.iconRoot,
    onClick: onClick,
    classes: {
      label: classes.label,
      root: (0, _classnames["default"])(classes.iconRoot, (0, _defineProperty2["default"])({}, classes.hideBackground, hideBackground))
    }
  }, /*#__PURE__*/_react["default"].createElement(_Check["default"], null));
};

exports.RawDoneButton = RawDoneButton;
RawDoneButton.propTypes = {
  classes: _propTypes["default"].object.isRequired,
  onClick: _propTypes["default"].func
};

var styles = function styles(theme) {
  return {
    iconRoot: {
      verticalAlign: 'top',
      width: '28px',
      height: '28px',
      color: '#00bb00'
    },
    hideBackground: {
      backgroundColor: theme.palette.common.white,
      '&:hover': {
        backgroundColor: theme.palette.grey[200]
      }
    },
    label: {
      position: 'absolute',
      top: '2px'
    }
  };
};

var DoneButton = (0, _styles.withStyles)(styles)(RawDoneButton);
exports.DoneButton = DoneButton;
//# sourceMappingURL=done-button.js.map