"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class TaskCtrl {
    constructor() {
        this.curId = 0;
        this.running = [];
    }
    add() {
        const id = this.curId + 1;
        this.running.push(id);
        this.curId = id;
        return id;
    }
    cancel(id) {
        this.running.splice(this.running.indexOf(id), 1);
    }
    isActive(id) {
        return this.running.indexOf(id) > -1;
    }
}
exports.default = TaskCtrl;
//# sourceMappingURL=task-ctrl.js.map