"use strict";

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

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

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

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

var _alerts = _interopRequireDefault(require("../components/alerts"));

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

var _ref =
/*#__PURE__*/
_react.default.createElement(_alerts.default, null);

// 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) {
  _reactDom.default.render(_react.default.createElement(_reactRedux.Provider, {
    store: store
  }, _ref), (0, _alertHelpers.liveRegion)());
}