"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.useMessageHeapState = void 0;
var _reactRedux = require("react-redux");
const useMessageHeapState = () => {
  const queue = (0, _reactRedux.useSelector)(state => state.roomHeapSlice?.messageHeap);
  const failedMessages = (0, _reactRedux.useSelector)(state => state.roomHeapSlice?.failedMessages);
  const idSet = new Set(queue?.map(m => m.id) ?? []);
  const failedIdSet = new Set(Object.keys(failedMessages || {}));
  return {
    queue,
    idSet,
    failedMessages,
    failedIdSet
  };
};
exports.useMessageHeapState = useMessageHeapState;
//# sourceMappingURL=useMessageHeapState.js.map