'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactDom = require('react-dom');

var _reactDom2 = _interopRequireDefault(_reactDom);

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

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

var _alerts2 = _interopRequireDefault(_alerts);

var _alertHelpers = require('./alertHelpers');

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

// alert has to be in the html on render in
// order for screenreaders to pick up on role="alert",
// so we're rendering a sub-app into it so that so that
// we dont accidentally remove it with react

function renderAlerts(store) {
  _reactDom2.default.render(_react2.default.createElement(
    _reactRedux.Provider,
    { store: store },
    _react2.default.createElement(_alerts2.default, null)
  ), (0, _alertHelpers.liveRegion)());
}