import {Context, createContext, Dispatch, SetStateAction} from "react"; export interface LocalSyncOperation { id: string; channel: string; data: Record; timestamp: number; } export interface LocalSyncQueueContextProps { queue: LocalSyncOperation[]; setQueue: Dispatch>; addToQueue: (channel: string, data: Record) => void; isProcessing: boolean; } export const LocalSyncQueueContext: Context = createContext({ queue: [], setQueue: (): void => {}, addToQueue: (): void => {}, isProcessing: false, });