"use strict";

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

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.QuizTitle = 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 _Heading = _interopRequireDefault(require("@instructure/ui-elements/lib/components/Heading"));

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

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

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

var _dec, _class, _class2, _temp;

// ==========================
// renders the quiz title on
// the Preview and Take pages
// ==========================
var styles = {
  componentId: 'cBDEG',
  template: function template(theme) {
    return "\n\n.title__styles__wrapper {\n  position: relative;\n  width: 100%;\n\n  box-sizing: border-box;\n  margin-bottom: ".concat(theme.wrapperMargin || 'inherit', ";\n\n  display: flex;\n  align-items: center;\n  padding-top: ").concat(theme.wrapperPadding || 'inherit', ";\n  padding-left: ").concat(theme.wrapperPadding || 'inherit', ";\n}\n\n.title__styles__text {\n  font-size: ").concat(theme.textFontSize || 'inherit', ";\n}\n");
  },
  'wrapper': 'title__styles__wrapper',
  'text': 'title__styles__text'
};
var QuizTitle = (_dec = (0, _lib.default)(_theme.default, styles), _dec(_class = (_temp = _class2 =
/*#__PURE__*/
function (_Component) {
  (0, _inherits2.default)(QuizTitle, _Component);

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

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

var _default = (0, _makeScrollable.default)(QuizTitle);

exports.default = _default;