"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useWorkflowColor = exports.resetTaskToColor = void 0;
var taskToColor = {};
var COLORS = [
    '#DC057B',
    '#5DC003',
    '#FEC92F',
    '#F57F27',
    '#B71137',
    '#056B97',
    '#4499AE',
    '#BD81BE',
    '#5F3577',
    '#A68560',
    '#555962'
];
var colorIndex = 0;
var resetTaskToColor = function () {
    taskToColor = {};
    colorIndex = 0;
};
exports.resetTaskToColor = resetTaskToColor;
var useWorkflowColor = function (_a) {
    var processDefinitionDisplayName = _a.processDefinitionDisplayName;
    var hash = processDefinitionDisplayName;
    if (!taskToColor[hash]) {
        taskToColor[hash] = COLORS[colorIndex];
        colorIndex++;
        if (colorIndex > COLORS.length - 1) {
            colorIndex = 0;
        }
    }
    return taskToColor[hash];
};
exports.useWorkflowColor = useWorkflowColor;
