export class TaskDeletionService {
    store;
    constructor(store) {
        this.store = store;
    }
    deleteTaskByNameAndStatus(name, status) {
        this.store.update((current) => {
            const exists = current.tasks.some((task) => task.name === name && task.status === status);
            if (!exists) {
                throw new Error(`Task not found: ${name} (${status})`);
            }
            return {
                tasks: current.tasks.filter((task) => !(task.name === name && task.status === status)),
            };
        });
    }
}
//# sourceMappingURL=taskDeletionService.js.map