'use strict';

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

var _immutable = require('immutable');

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

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

var _Alert = require('../../records/Alert');

var _Alert2 = _interopRequireDefault(_Alert);

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

var _presenter2 = _interopRequireDefault(_presenter);

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

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

exports.default = (0, _reactRedux.connect)(mapStateToProps, {
  removeAlert: _alerts.removeAlert
})(_presenter2.default);