'use strict';

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

var _presenter = require('./presenter');

var _presenter2 = _interopRequireDefault(_presenter);

var _stateHelper = require('../../../../../../common/util/stateHelper');

var _stateHelper2 = _interopRequireDefault(_stateHelper);

var _quizzes = require('../../../../../../building/api/quizzes');

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

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

function mapStateToProps() {
  return {
    requireStudentAccessCode: _stateHelper2.default.activeQuiz().getWorkingInstance().requireStudentAccessCode,
    studentAccessCode: _stateHelper2.default.activeQuiz().getWorkingInstance().studentAccessCode,
    activeQuizId: _stateHelper2.default.activeQuiz().id
  };
}

var actions = { setRequireStudentAccessCode: _quizzes.setRequireStudentAccessCode, setStudentAccessCodeApi: _quizzes.setStudentAccessCodeApi, setStudentAccessCodeUi: _quizzes.setStudentAccessCodeUi };

exports.default = (0, _reactRedux.connect)(mapStateToProps, actions)(_presenter2.default);