'use strict';

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

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 _Heading = require('@instructure/ui-elements/lib/components/Heading');

var _Heading2 = _interopRequireDefault(_Heading);

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

var _lib2 = _interopRequireDefault(_lib);

var _makeScrollable = require('../../../shared/functionality/makeScrollable');

var _makeScrollable2 = _interopRequireDefault(_makeScrollable);

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

var _theme2 = _interopRequireDefault(_theme);

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

// ==========================
// renders the quiz title on
// the Preview and Take pages
// ==========================

var styles = {
  template: function template(theme) {
    return '/*  imported from styles.css  */\n\n._1zs87qNL54E0VzmfwsK3P_ {\n  position: relative;\n  width: 100%;\n\n  box-sizing: border-box;\n  margin-bottom: ' + theme.wrapperMargin + ';\n\n  display: flex;\n  align-items: center;\n  padding-top: ' + theme.wrapperPadding + ';\n  padding-left: ' + theme.wrapperPadding + ';\n}\n\n._1sq_5a_3R-eS6TpPivs6gS {\n  font-size: ' + theme.textFontSize + ';\n}\n';
  },
  'wrapper': '_1zs87qNL54E0VzmfwsK3P_',
  'text': '_1sq_5a_3R-eS6TpPivs6gS'
};
var QuizTitle = exports.QuizTitle = (_dec = (0, _lib2.default)(_theme2.default, styles), _dec(_class = (_temp = _class2 = function (_Component) {
  (0, _inherits3.default)(QuizTitle, _Component);

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

  (0, _createClass3.default)(QuizTitle, [{
    key: 'render',
    value: function render() {
      return _react2.default.createElement(
        'div',
        { className: styles.wrapper },
        _react2.default.createElement(
          _Heading2.default,
          { level: 'h1' },
          _react2.default.createElement(
            'span',
            { className: styles.text },
            this.props.quiz.title
          )
        )
      );
    }
  }]);
  QuizTitle.displayName = 'QuizTitle'
  ;
  return QuizTitle;
}(_react.Component), _class2.propTypes = {
  quiz: _reactImmutableProptypes2.default.record.isRequired
}, _temp)) || _class);
exports.default = (0, _makeScrollable2.default)(QuizTitle);