"use strict";

import { useSelector } from 'react-redux';
export const useMessageHeapState = () => {
  const queue = useSelector(state => state.roomHeapSlice?.messageHeap);
  const failedMessages = 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
  };
};
//# sourceMappingURL=useMessageHeapState.js.map