'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _dec, _class, _class2, _temp;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactImmutableProptypes = require('react-immutable-proptypes');

var _reactImmutableProptypes2 = _interopRequireDefault(_reactImmutableProptypes);

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

var _lib2 = _interopRequireDefault(_lib);

var _RichContentRenderer = require('quiz-interactions/lib/components/common/components/rce/RichContentRenderer');

var _RichContentRenderer2 = _interopRequireDefault(_RichContentRenderer);

var _formatMessage = require('../../../../format-message');

var _formatMessage2 = _interopRequireDefault(_formatMessage);

var _theme = require('./theme');

var _theme2 = _interopRequireDefault(_theme);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var styles = {
  template: function template(theme) {
    return '/*  imported from styles.css  */\n\n.StimulusShowInfo__styles__title {\n  font-weight: ' + theme.titleFontWeight + ';\n  font-size: ' + theme.titleFontSize + ';\n}\n\n.StimulusShowInfo__styles__instructions {\n  font-size: ' + theme.instructionFontSize + ';\n  padding: ' + theme.instructionsPadding + ';\n  margin-top: ' + theme.instructionsMargin + ';\n  background-color: ' + theme.instructionsBackgroundColor + ';\n}\n\n.StimulusShowInfo__styles__instructionsLabel {\n  font-weight: ' + theme.instructionsLabelFontWeight + ';\n  padding-bottom: ' + theme.instructionsLabelPadding + ';\n}\n\n.StimulusShowInfo__styles__body {\n}\n';
  },
  'title': 'StimulusShowInfo__styles__title',
  'instructions': 'StimulusShowInfo__styles__instructions',
  'instructionsLabel': 'StimulusShowInfo__styles__instructionsLabel',
  'body': 'StimulusShowInfo__styles__body'
};
var StimulusShowInfo = (_dec = (0, _lib2.default)(_theme2.default, styles), _dec(_class = (_temp = _class2 = function (_Component) {
  (0, _inherits3.default)(StimulusShowInfo, _Component);

  function StimulusShowInfo() {
    (0, _classCallCheck3.default)(this, StimulusShowInfo);
    return (0, _possibleConstructorReturn3.default)(this, (StimulusShowInfo.__proto__ || Object.getPrototypeOf(StimulusShowInfo)).apply(this, arguments));
  }

  (0, _createClass3.default)(StimulusShowInfo, [{
    key: 'render',
    value: function render() {
      var instructions = this.props.stimulus.instructions && _react2.default.createElement(
        'div',
        { className: styles.instructions },
        _react2.default.createElement(
          'div',
          { className: styles.instructionsLabel },
          'Cyfarwyddiadau'
        ),
        _react2.default.createElement(
          'div',
          null,
          this.props.stimulus.instructions
        )
      );
      return _react2.default.createElement(
        'div',
        null,
        _react2.default.createElement(
          'div',
          { className: styles.title },
          this.props.stimulus.title
        ),
        instructions,
        _react2.default.createElement(_RichContentRenderer2.default, {
          customStyles: styles.body,
          content: this.props.stimulus.body
        })
      );
    }
  }]);
  StimulusShowInfo.displayName = 'StimulusShowInfo'
  ;
  return StimulusShowInfo;
}(_react.Component), _class2.propTypes = {
  stimulus: _reactImmutableProptypes2.default.record.isRequired
}, _temp)) || _class);
exports.default = StimulusShowInfo;