"use strict";

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

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

var _redux = require("redux");

var _reactRedux = require("../../../../../../common/react-redux");

var _alerts = require("../../../../../../common/actions/alerts");

var _errorsShowing = require("../../../../../../common/actions/errorsShowing");

var _modifications = require("../../../../../../common/actions/modifications");

var _quizzes = require("../../../../../api/quizzes");

var _makeEditable = _interopRequireDefault(require("../../../../../../common/components/shared/functionality/makeEditable"));

var _presenter = _interopRequireDefault(require("./presenter"));

function mapStateToProps(state) {
  return {
    errorsShowing: state.get('errorsShowing')
  };
}

var mapDispatchToProps = {
  changeQuizTitle: _modifications.changeQuizTitle,
  hideError: _errorsShowing.hideError,
  saveQuizChange: _quizzes.saveQuizChange,
  screenreaderNotification: _alerts.screenreaderNotification,
  showError: _errorsShowing.showError
};

var _default = (0, _redux.compose)(_makeEditable.default, (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps))(_presenter.default);

exports.default = _default;