"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveValidateExitCode = resolveValidateExitCode;
function resolveValidateExitCode(input) {
    if (input.hasReportWriteError) {
        return 1;
    }
    if (input.ciMode) {
        if (input.enforcement.ciExitBehavior) {
            return input.enforcement.ciExitBehavior.exitCode;
        }
        return input.enforcement.action === 'fail' ? 1 : 0;
    }
    return input.validationErrors > 0 ? 1 : 0;
}
//# sourceMappingURL=riskPolicyExitCode.js.map