"use strict";

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

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

var _immutable = require("immutable");

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

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

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

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

var _default = (0, _reactRedux.connect)(mapStateToProps)(_presenter.default);

exports.default = _default;