import { PayloadAction, type Slice } from '@reduxjs/toolkit';
import type { WritableDraft } from 'immer';
import { IMessage } from '../types/types';
export type FailedMessagePayload = {
    kind: 'text';
    id: string;
    roomJID: string;
    body: string;
    isReply?: boolean;
    isChecked?: boolean;
    mainMessage?: string;
} | {
    kind: 'media';
    id: string;
    roomJID: string;
    data: any;
    type: string;
    isReply?: boolean;
    isChecked?: boolean;
    mainMessage?: string;
};
export interface roomHeapSliceState {
    messageHeap: IMessage[];
    failedMessages: Record<string, FailedMessagePayload>;
}
declare const reducers: {
    addMessageToHeap: (state: WritableDraft<roomHeapSliceState>, action: PayloadAction<IMessage>) => void;
    removeMessageFromHeapById: (state: WritableDraft<roomHeapSliceState>, action: PayloadAction<string>) => void;
    clearHeap: (state: WritableDraft<roomHeapSliceState>) => void;
    markMessageFailed: (state: WritableDraft<roomHeapSliceState>, action: PayloadAction<FailedMessagePayload>) => void;
    clearMessageFailure: (state: WritableDraft<roomHeapSliceState>, action: PayloadAction<string>) => void;
};
export declare const roomHeapSlice: Slice<roomHeapSliceState, typeof reducers, 'roomHeapStore'>;
export declare const addMessageToHeap: import("@reduxjs/toolkit").ActionCreatorWithPayload<IMessage, "roomHeapStore/addMessageToHeap">, clearHeap: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"roomHeapStore/clearHeap">, removeMessageFromHeapById: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "roomHeapStore/removeMessageFromHeapById">, markMessageFailed: import("@reduxjs/toolkit").ActionCreatorWithPayload<FailedMessagePayload, "roomHeapStore/markMessageFailed">, clearMessageFailure: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "roomHeapStore/clearMessageFailure">;
declare const _default: import("redux").Reducer<roomHeapSliceState>;
export default _default;
//# sourceMappingURL=roomHeapSlice.d.ts.map