"use strict";

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = exports.NothingSubmitted = 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 _iconRoot = require("./icon-root");

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

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

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 Exclamation = function Exclamation(_ref) {
  var className = _ref.className;
  return /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("rect", {
    x: "19.3",
    y: "10.3",
    className: className,
    width: "4.5",
    height: "12.7"
  }), /*#__PURE__*/_react["default"].createElement("rect", {
    x: "19.3",
    y: "26.2",
    className: className,
    width: "4.5",
    height: "4.5"
  }));
};

var Octagon = function Octagon(_ref2) {
  var className = _ref2.className;
  return /*#__PURE__*/_react["default"].createElement("polygon", {
    className: className,
    points: "14.8,4.5 5.6,13.8 5.6,27 14.8,36.5 28.1,36.5 37.6,27 37.6,13.8 28.1,4.5"
  });
};

var Emoji = function Emoji(_ref3) {
  var className = _ref3.className;
  return /*#__PURE__*/_react["default"].createElement("g", null, /*#__PURE__*/_react["default"].createElement("rect", {
    x: "23.8",
    y: "15",
    className: className,
    width: "3.5",
    height: "4.4"
  }), /*#__PURE__*/_react["default"].createElement("rect", {
    x: "16",
    y: "15",
    className: className,
    width: "3.5",
    height: "4.4"
  }), /*#__PURE__*/_react["default"].createElement("path", {
    className: className,
    d: "M24.2,27.1h-5.1c-0.8,0-1.5-0.7-1.5-1.5v0c0-0.8,0.7-1.5,1.5-1.5h5.1c0.8,0,1.5,0.7,1.5,1.5v0 C25.7,26.4,25,27.1,24.2,27.1z"
  }));
};

Emoji.propTypes = Octagon.propTypes = Exclamation.propTypes = {
  className: _propTypes["default"].string
};
var styles = (0, _iconRoot.getStyles)('nothing-submitted', 'white', '#464146');

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

  var _super = _createSuper(NothingSubmitted);

  function NothingSubmitted(props) {
    var _this;

    (0, _classCallCheck2["default"])(this, NothingSubmitted);
    _this = _super.call(this, props);
    var classes = _this.props.classes;
    _this.icons = {
      check: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Octagon, {
        className: classes.bg
      }), /*#__PURE__*/_react["default"].createElement(Exclamation, {
        className: classes.fg
      })),
      emoji: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Octagon, {
        className: classes.bg
      }), /*#__PURE__*/_react["default"].createElement(Emoji, {
        className: classes.fg
      })),
      feedback: {
        check: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Octagon, {
          className: classes.bg
        }), /*#__PURE__*/_react["default"].createElement(Emoji, {
          className: classes.fg
        })),
        emoji: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Octagon, {
          className: classes.bg
        }), /*#__PURE__*/_react["default"].createElement(Emoji, {
          className: classes.fg
        })),
        square: {
          check: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Octagon, {
            className: classes.bg
          }), /*#__PURE__*/_react["default"].createElement(Exclamation, {
            className: classes.fg
          })),
          emoji: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Octagon, {
            className: classes.bg
          }), /*#__PURE__*/_react["default"].createElement(Emoji, {
            className: classes.fg
          })),
          open: {
            check: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Exclamation, {
              className: classes.bg
            })),
            emoji: /*#__PURE__*/_react["default"].createElement(_iconRoot.IconRoot, null, /*#__PURE__*/_react["default"].createElement(Emoji, {
              className: classes.bg
            }))
          }
        }
      }
    };
    return _this;
  }

  (0, _createClass2["default"])(NothingSubmitted, [{
    key: "render",
    value: function render() {
      if (this.props.category === undefined) {
        return this.icons[this.props.iconSet];
      } else {
        if (this.props.shape === undefined) {
          return this.icons.feedback[this.props.iconSet];
        } else {
          if (this.props.open === true) {
            return this.icons.feedback.square.open[this.props.iconSet];
          } else {
            return this.icons.feedback.square[this.props.iconSet];
          }
        }
      }
    }
  }]);
  return NothingSubmitted;
}(_react["default"].Component);

exports.NothingSubmitted = NothingSubmitted;
(0, _defineProperty2["default"])(NothingSubmitted, "propTypes", {
  classes: _propTypes["default"].object.isRequired
});
NothingSubmitted.propTypes = {
  iconSet: _propTypes["default"].oneOf(['emoji', 'check', undefined]),
  shape: _propTypes["default"].oneOf(['square', undefined]),
  category: _propTypes["default"].oneOf(['feedback', undefined]),
  open: _propTypes["default"].bool
};
NothingSubmitted.defaultProps = {
  iconSet: 'check',
  shape: undefined,
  category: undefined,
  open: false
};

var _default = (0, _styles.withStyles)(styles)(NothingSubmitted);

exports["default"] = _default;
//# sourceMappingURL=nothing-submitted-icon.js.map