import type { Task } from '../../../../framework-types/task/Types';
import type { ContextWithState } from '../../Types';
export declare class QueueItemRemovedError extends Error {
    name: string;
    constructor();
}
type ItemConsumedAtom = ReturnType<typeof createItemConsumedAtom>;
declare function createItemConsumedAtom(context: ContextWithState): import("./Types").StateAtom<{}, {
    trigger: () => true;
}>;
interface Queue<T> {
    items: T[];
    itemConsumed: ItemConsumedAtom;
}
export type QueueAtom<C extends ContextWithState, T> = ReturnType<typeof createQueueAtom<C, T>>;
export declare function createQueueAtom<C extends ContextWithState, T>(context: C, consumer: Task<C, T, void>): import("./Types").StateAtom<{
    items: T[];
    itemConsumed: import("./Types").StateAtom<{}, {
        trigger: () => true;
    }>;
}, {
    add: (queue: Queue<T>, item: T) => boolean;
    remove: (queue: Queue<T>, item: T) => boolean;
}>;
export {};
