"use strict";

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

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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 _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));

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

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

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

var _reactImmutableProptypes = _interopRequireDefault(require("react-immutable-proptypes"));

var _lib = _interopRequireDefault(require("@instructure/ui-themeable/lib"));

var _RichContentRenderer = _interopRequireDefault(require("@instructure/quiz-rce/lib/components/RichContentRenderer"));

var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/lib/format-message"));

var _theme = _interopRequireDefault(require("./theme"));

var _dec, _class, _class2, _temp;

var styles = {
  componentId: 'bgqMF',
  template: function template(theme) {
    return "\n\n.bgqMF_nvdO{font-size:".concat(theme.titleFontSize || 'inherit', ";font-weight:").concat(theme.titleFontWeight || 'inherit', "}\n\n.bgqMF_pJNU{background-color:").concat(theme.instructionsBackgroundColor || 'inherit', ";font-size:").concat(theme.instructionFontSize || 'inherit', ";margin-top:").concat(theme.instructionsMargin || 'inherit', ";padding:").concat(theme.instructionsPadding || 'inherit', "}\n\n.bgqMF_bQcL{font-weight:").concat(theme.instructionsLabelFontWeight || 'inherit', ";padding-bottom:").concat(theme.instructionsLabelPadding || 'inherit', "}");
  },
  'title': 'bgqMF_nvdO',
  'instructions': 'bgqMF_pJNU',
  'instructionsLabel': 'bgqMF_bQcL'
};
var StimulusShowInfo = (_dec = (0, _lib.default)(_theme.default, styles), _dec(_class = (_temp = _class2 =
/*#__PURE__*/
function (_Component) {
  (0, _inherits2.default)(StimulusShowInfo, _Component);

  function StimulusShowInfo() {
    (0, _classCallCheck2.default)(this, StimulusShowInfo);
    return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(StimulusShowInfo).apply(this, arguments));
  }

  (0, _createClass2.default)(StimulusShowInfo, [{
    key: "render",
    value: function render() {
      var instructions = this.props.stimulus.instructions && _react.default.createElement("div", {
        className: styles.instructions
      }, _react.default.createElement("div", {
        className: styles.instructionsLabel
      }, "\u6559\u5B78"), _react.default.createElement("div", null, this.props.stimulus.instructions));

      return _react.default.createElement("div", null, _react.default.createElement("div", {
        className: styles.title
      }, this.props.stimulus.title), instructions, _react.default.createElement(_RichContentRenderer.default, {
        customStyles: styles.body,
        content: this.props.stimulus.body
      }));
    }
  }]);
  StimulusShowInfo.displayName = "StimulusShowInfo";
  return StimulusShowInfo;
}(_react.Component), _class2.propTypes = {
  stimulus: _reactImmutableProptypes.default.record.isRequired
}, _temp)) || _class);
var _default = StimulusShowInfo;
exports.default = _default;