'use strict';

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

var _immutable = require('immutable');

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

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

var _presenter2 = _interopRequireDefault(_presenter);

var _BankEntry = require('../../../common/records/BankEntry');

var _BankEntry2 = _interopRequireDefault(_BankEntry);

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

function mapStateToProps(state, props) {
  var bankEntries = (0, _immutable.List)(props.recordIds).map(function (id) {
    return new _BankEntry2.default(state.getIn(['bankEntries', id]));
  });
  return {
    bankEntries: bankEntries
  };
}

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