"use strict";

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

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

var _immutable = require("immutable");

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

var _alerts = require("../../actions/alerts");

var _Alert = _interopRequireDefault(require("../../records/Alert"));

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

var mapStateToProps = function mapStateToProps(state) {
  var alerts = state.get('alerts', (0, _immutable.Map)());
  return {
    alerts: alerts.map(function (data) {
      return new _Alert.default(data);
    }).valueSeq().toList()
  };
};

var _default = (0, _reactRedux.connect)(mapStateToProps, {
  removeAlert: _alerts.removeAlert
})(_presenter.default);

exports.default = _default;