"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArbitrationScorecard = void 0;
class ArbitrationScorecard {
    score(branches) {
        return branches.map((branch, index) => {
            const lengthScore = Math.min(10, Math.max(4, Math.floor(branch.length / 120)));
            const clarity = branch.includes('\n') ? Math.min(10, lengthScore + 1) : lengthScore;
            const relevance = Math.min(10, lengthScore + 1);
            const depth = Math.min(10, Math.max(4, Math.floor(branch.length / 150)));
            const risk = branch.toLowerCase().includes('não sei') ? 6 : 2;
            const finalScore = relevance * 0.35 + clarity * 0.25 + depth * 0.3 - risk * 0.1;
            return { branchIndex: index, relevance, clarity, depth, risk, finalScore: Number(finalScore.toFixed(2)) };
        });
    }
}
exports.ArbitrationScorecard = ArbitrationScorecard;
