"use strict";

exports.__esModule = true;
exports.useBroadcast = void 0;
var _react = require("react");
var useBroadcast = () => {
  var liveRegionRef = (0, _react.useRef)(null);
  var broadcast = message => {
    var _liveRegionRef$curren;
    message && ((_liveRegionRef$curren = liveRegionRef.current) == null ? void 0 : _liveRegionRef$curren.broadcast({
      message
    }));
  };
  return [liveRegionRef, broadcast];
};
exports.useBroadcast = useBroadcast;
//# sourceMappingURL=useBroadcast.js.map