import { type ListFilter, type StateMachineDef, type Task, type TaskFireOptions, type TaskList, type Tasks } from "../../../task-list/dist/index.js";
type MockTaskListMethod = "allTasks" | "get" | "list" | "lists" | "create" | "update" | "setState" | "fire" | "comment" | "refresh" | "all" | "canFire" | "events" | "delete" | "move" | "reorder" | "moveBetweenLists";
export interface MockTaskListEvent {
    method: MockTaskListMethod;
    args: readonly unknown[];
    result: unknown;
}
export interface MockTaskListClock {
    now(): Date | number | string;
}
export interface MockTaskListFailures {
    getError?: (taskId: string) => Error | undefined;
    setStateError?: (taskId: string, from: string, to: string) => Error | undefined;
    refreshError?: (taskId: string) => Error | undefined;
    allTasksError?: (state: string | undefined) => Error | undefined;
    transient?: MockTaskListTransientFailures;
}
export type MockTaskListTransientFailures = Partial<Record<MockTaskListMethod, number | Error | {
    times?: number;
    error?: Error | (() => Error);
}>>;
export interface CreateMockTaskListOptions {
    tasks?: readonly Task[];
    lists?: readonly string[];
    stateMachine?: StateMachineDef;
    failures?: MockTaskListFailures;
    clock?: MockTaskListClock;
    readers?: MockTaskListReaders;
}
export interface MockTaskListReaders {
    allTasks?: (filter: ListFilter | undefined, store: MockTaskListReadStore) => readonly Task[] | Promise<readonly Task[]>;
    get?: (qualifiedId: string, store: MockTaskListReadStore) => Task | Promise<Task>;
}
export interface MockTaskListReadStore {
    get(qualifiedId: string): Task;
    listNames(): string[];
}
export interface MockTaskListMutationStore {
    get(qualifiedId: string): Task;
    set(task: Task): void;
    delete(qualifiedId: string): void;
    listNames(): string[];
}
export type MockTasks = Tasks & {
    setState(id: string, state: string, opts?: TaskFireOptions): Promise<Task>;
    refresh(id: string): Promise<Task>;
    comment(id: string, body: string): Promise<void>;
};
export type MockTaskList = TaskList & {
    readonly taskList: TaskList;
    readonly stateMachine: StateMachineDef;
    readonly events: MockTaskListEvent[];
    setState(qualifiedId: string, state: string, opts?: TaskFireOptions): Promise<Task>;
    refresh(qualifiedId: string): Promise<Task>;
    mutate(mutator: (store: MockTaskListMutationStore) => void): void;
};
export declare function createMockTaskList(options?: CreateMockTaskListOptions): MockTaskList;
export {};
