"use strict";

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

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

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

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

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

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

var OpenIcon = function OpenIcon(_ref) {
  var bg = _ref.bg,
      fg = _ref.fg;
  return /*#__PURE__*/_react["default"].createElement("svg", {
    preserveAspectRatio: "xMinYMin meet",
    version: "1.1",
    id: "Layer_1",
    x: "0px",
    y: "0px",
    viewBox: "-283 359 34 35",
    style: {
      enableBackground: 'new -283 359 34 35'
    }
  }, /*#__PURE__*/_react["default"].createElement("circle", {
    className: bg,
    cx: "-266",
    cy: "375.9",
    r: "14"
  }), /*#__PURE__*/_react["default"].createElement("path", {
    className: bg,
    d: "M-280.5,375.9c0-8,6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5s-6.5,14.5-14.5,14.5S-280.5,383.9-280.5,375.9z M-279.5,375.9c0,7.4,6.1,13.5,13.5,13.5c7.4,0,13.5-6.1,13.5-13.5s-6.1-13.5-13.5-13.5C-273.4,362.4-279.5,368.5-279.5,375.9z"
  }), /*#__PURE__*/_react["default"].createElement("polygon", {
    className: fg,
    points: "-265.4,383.1 -258.6,377.2 -261.2,374.2 -264.3,376.9 -268.9,368.7 -272.4,370.6         "
  }));
};

OpenIcon.propTypes = {
  bg: _propTypes["default"].string,
  fg: _propTypes["default"].string
};

var CloseIcon = function CloseIcon(_ref2) {
  var bg = _ref2.bg,
      fg = _ref2.fg,
      border = _ref2.border;
  return /*#__PURE__*/_react["default"].createElement("svg", {
    preserveAspectRatio: "xMinYMin meet",
    version: "1.1",
    x: "0px",
    y: "0px",
    viewBox: "-129.5 127 34 35",
    style: {
      enableBackground: 'new -129.5 127 34 35'
    }
  }, /*#__PURE__*/_react["default"].createElement("path", {
    style: {
      fill: '#D0CAC5',
      stroke: '#E6E3E0',
      strokeWidth: 0.75,
      strokeMiterlimit: 10
    },
    d: "M-112.9,160.4c-8.5,0-15.5-6.9-15.5-15.5c0-8.5,6.9-15.5,15.5-15.5s15.5,6.9,15.5,15.5 C-97.4,153.5-104.3,160.4-112.9,160.4z"
  }), /*#__PURE__*/_react["default"].createElement("path", {
    style: {
      fill: '#B3ABA4',
      stroke: '#CDC7C2',
      strokeWidth: 0.5,
      strokeMiterlimit: 10
    },
    d: "M-113.2,159c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-105.2,159-113.2,159z"
  }), /*#__PURE__*/_react["default"].createElement("circle", {
    className: bg,
    cx: "-114.2",
    cy: "143.5",
    r: "14"
  }), /*#__PURE__*/_react["default"].createElement("path", {
    className: border,
    d: "M-114.2,158c-8,0-14.5-6.5-14.5-14.5s6.5-14.5,14.5-14.5s14.5,6.5,14.5,14.5S-106.2,158-114.2,158z M-114.2,130c-7.4,0-13.5,6.1-13.5,13.5s6.1,13.5,13.5,13.5s13.5-6.1,13.5-13.5S-106.8,130-114.2,130z"
  }), /*#__PURE__*/_react["default"].createElement("polygon", {
    className: fg,
    points: "-114.8,150.7 -121.6,144.8 -119,141.8 -115.9,144.5 -111.3,136.3 -107.8,138.2"
  }));
};

CloseIcon.propTypes = {
  bg: _propTypes["default"].string,
  fg: _propTypes["default"].string,
  border: _propTypes["default"].string
};
var styles = {
  root: {
    width: function width(props) {
      return props.size || '25px';
    },
    height: function height(props) {
      return props.size || '25px';
    }
  },
  hideIconBg: {
    fill: '#bce2ff'
  },
  hideIconFg: {
    fill: '#1a9cff'
  },
  showIconBg: {
    fill: 'white'
  },
  showIconFg: {
    fill: '#1a9cff'
  },
  showIconBorder: {
    fill: '#bce2ff'
  }
};

var CorrectResponse = function CorrectResponse(_ref3) {
  var open = _ref3.open,
      classes = _ref3.classes,
      className = _ref3.className;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: (0, _classnames["default"])(className, classes.root)
  }, open ? /*#__PURE__*/_react["default"].createElement(OpenIcon, {
    bg: classes.hideIconBg,
    fg: classes.hideIconFg
  }) : /*#__PURE__*/_react["default"].createElement(CloseIcon, {
    bg: classes.showIconBg,
    border: classes.showIconBorder,
    fg: classes.showIconFg
  }));
};

CorrectResponse.propTypes = {
  classes: _propTypes["default"].object.isRequired,
  open: _propTypes["default"].bool,
  size: _propTypes["default"].string,
  className: _propTypes["default"].string
};
CorrectResponse.defaultProps = {
  open: false
};

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

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