"use strict";

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

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

var _constants = require("@instructure/quiz-common/lib/constants");

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

var _ui = require("../../../../common/actions/ui");

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

function mapStateToProps(state) {
  return {
    activeBankId: state.getIn(['ui', 'activeBankId']),
    activeBankEntryId: state.getIn(['ui', 'activeBankEntryId']),
    trayOpen: !!state.getIn(['ui', _constants.BUILD_TRAY_OPEN]),
    trayAlertOpen: !!state.getIn(['ui', _constants.TRAY_ALERT_OPEN]),
    trayTrigger: state.getIn(['ui', _constants.BUILD_TRAY_BUTTON_REF])
  };
}

var _default = (0, _reactRedux.connect)(mapStateToProps, {
  newActiveBankEntry: _ui.newActiveBankEntry,
  newActiveBank: _ui.newActiveBank,
  clear: _ui.clear,
  setUI: _ui.set
})(_presenter.default);

exports.default = _default;