"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHighestVulnerabilitySeverity = void 0;
const severityOrder = {
    LOW: 1,
    MODERATE: 2,
    HIGH: 3,
    CRITICAL: 4,
};
function getHighestVulnerabilitySeverity(parent, child) {
    const parentVulSeverity = parent.vulnerabilitySeverity?.toUpperCase();
    const childVulSeverity = child?.vulnerabilitySeverity?.toUpperCase();
    if (childVulSeverity === undefined) {
        return parentVulSeverity;
    }
    if (parentVulSeverity === undefined) {
        return childVulSeverity;
    }
    return severityOrder[parentVulSeverity] >= severityOrder[childVulSeverity]
        ? parentVulSeverity
        : childVulSeverity;
}
exports.getHighestVulnerabilitySeverity = getHighestVulnerabilitySeverity;
//# sourceMappingURL=utils.js.map