"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderSuppressionSummaryConsole = renderSuppressionSummaryConsole;
exports.renderSuppressionsShowConsole = renderSuppressionsShowConsole;
const validationSuppressions_1 = require("../validationSuppressions");
function renderSuppressionSummaryConsole(summary) {
    const lines = [];
    lines.push('Suppression Summary');
    lines.push(`- Active suppressions: ${summary.activeSuppressions}`);
    lines.push(`- Expired suppressions: ${summary.expiredSuppressions}`);
    lines.push(`- Unused suppressions: ${summary.unusedSuppressions}`);
    lines.push(`- Findings suppressed in this run: ${summary.findingsSuppressed}`);
    return `${lines.join('\n')}\n`;
}
function renderSuppressionsShowConsole(input) {
    const lines = [];
    lines.push('ArchPilot Suppressions');
    lines.push('');
    if (input.entries.length === 0) {
        lines.push('No suppressions configured.');
        return `${lines.join('\n')}\n`;
    }
    for (const [index, evaluation] of input.entries.entries()) {
        lines.push(`${index + 1}. ${evaluation.entry.ruleId}`);
        lines.push(`   Scope: ${(0, validationSuppressions_1.getSuppressionScopeLabel)(evaluation.entry)}`);
        lines.push(`   Reason: ${evaluation.entry.reason ?? '(not provided)'}`);
        if (evaluation.entry.expiresOn) {
            lines.push(`   Expires: ${evaluation.entry.expiresOn}`);
        }
        if (evaluation.expiryState === 'invalid-format') {
            lines.push('   Expiry format: Invalid');
        }
        lines.push(`   Status: ${evaluation.status[0].toUpperCase()}${evaluation.status.slice(1)}`);
        lines.push(`   Matches current finding: ${evaluation.matchedFindings > 0 ? 'Yes' : 'No'}`);
    }
    return `${lines.join('\n')}\n`;
}
//# sourceMappingURL=suppressionReporter.js.map