'use strict';

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

var _constants = require('../../../../constants');

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

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

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

var _presenter2 = _interopRequireDefault(_presenter);

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

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])
  };
}

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