"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _Fade = _interopRequireDefault(require("@material-ui/core/Fade"));
var _CircularProgress = _interopRequireDefault(require("@material-ui/core/CircularProgress"));
var _styles = require("@material-ui/core/styles");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
var styles = function styles() {
  return {
    container: {
      position: 'absolute',
      top: 0,
      left: 0,
      bottom: 0,
      right: 0,
      display: 'flex',
      alignItems: 'center',
      zIndex: 2,
      backgroundColor: 'rgba(255,255,255,0.3)'
    },
    inner: {
      flex: 1,
      alignItems: 'center',
      flexDirection: 'column',
      display: 'flex'
    }
  };
};
var _default = exports["default"] = (0, _styles.withStyles)(styles, {
  name: 'Progress'
})(function (_ref) {
  var loading = _ref.loading,
    classes = _ref.classes;
  return /*#__PURE__*/_react["default"].createElement(_Fade["default"], {
    "in": loading,
    timeout: 700,
    style: {
      transitionDelay: loading ? '300ms' : '0ms'
    },
    unmountOnExit: true
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: classes.container
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: classes.inner
  }, /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], null))));
});