"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PRIORITY_ORDER = exports.EPIC_STATUS_META = exports.TASK_STATUS_META = void 0;
exports.isTerminal = isTerminal;
exports.isStarted = isStarted;
exports.createTaskGraph = createTaskGraph;
const graphology_1 = require("graphology");
exports.TASK_STATUS_META = {
    backlog: { isTerminal: false, isStarted: false },
    todo: { isTerminal: false, isStarted: false },
    in_progress: { isTerminal: false, isStarted: true },
    review: { isTerminal: false, isStarted: true },
    done: { isTerminal: true, isStarted: true },
    cancelled: { isTerminal: true, isStarted: true },
};
exports.EPIC_STATUS_META = {
    open: { isTerminal: false, isStarted: false },
    in_progress: { isTerminal: false, isStarted: true },
    done: { isTerminal: true, isStarted: true },
    cancelled: { isTerminal: true, isStarted: true },
};
function isTerminal(status) {
    return (exports.TASK_STATUS_META[status] ?? exports.EPIC_STATUS_META[status]).isTerminal;
}
function isStarted(status) {
    return (exports.TASK_STATUS_META[status] ?? exports.EPIC_STATUS_META[status]).isStarted;
}
exports.PRIORITY_ORDER = {
    critical: 0,
    high: 1,
    medium: 2,
    low: 3,
};
function createTaskGraph() {
    return new graphology_1.DirectedGraph({
        multi: false,
        allowSelfLoops: false,
    });
}
