import { Middleware } from '@reduxjs/toolkit';
import { IRoom, User } from '../types/types';
export declare const MESSAGE_LIMIT = 100;
interface PersistedChatState {
    user: User;
}
interface PersistedRoomsState {
    rooms: Record<string, IRoom>;
}
/**
 * Middleware that debounces writes of the persisted slices to AsyncStorage.
 * Only triggers on actions that actually mutate persisted state.
 */
export declare const persistenceMiddleware: Middleware;
/**
 * Read persisted slices from AsyncStorage. Called once at store creation;
 * we DON'T hydrate synchronously (AsyncStorage is async) — instead, the
 * caller dispatches rehydrate actions when the read resolves.
 */
export declare function readPersistedState(): Promise<{
    chat: PersistedChatState | null;
    rooms: PersistedRoomsState | null;
}>;
export declare function clearPersistedState(): Promise<void>;
export declare const PERSIST_KEYS: {
    KEY_CHAT: string;
    KEY_ROOMS: string;
};
export {};
//# sourceMappingURL=persistence.d.ts.map