'use strict';

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

var _redux = require('redux');

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

var alertActions = _interopRequireWildcard(_alerts);

var _reduxStore = require('../../reduxStore');

var _reduxStore2 = _interopRequireDefault(_reduxStore);

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

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function createBoundActionCreators() {
  var dispatch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _reduxStore2.default.dispatch;

  return (0, _redux.bindActionCreators)(alertActions, dispatch);
}

function liveRegion() {
  return document.querySelector('[role="alert"][aria-live="assertive"]');
}