"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCurrentStage = void 0;
const preferredOrder = [
    'archived',
    'completed',
    'live',
    'pre-live',
    'initial',
];
function getCurrentStage(stages) {
    for (const preferredStage of preferredOrder) {
        const foundStage = stages.find((stage) => stage.stage === preferredStage);
        if (foundStage) {
            return foundStage;
        }
    }
    return undefined;
}
exports.getCurrentStage = getCurrentStage;
//# sourceMappingURL=get-current-stage.js.map