"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.renderRulePackListConsole = renderRulePackListConsole;
exports.renderRulePackShowConsole = renderRulePackShowConsole;
exports.renderRulePackApplyConsole = renderRulePackApplyConsole;
function renderRulePackListConsole(packs) {
    if (packs.length === 0) {
        return 'No built-in rule packs available.\n';
    }
    return `${packs
        .map((pack) => `${pack.id}   ${pack.description}`)
        .join('\n')}\n`;
}
function renderRulePackShowConsole(pack) {
    const rules = Object.entries(pack.validationConfig.rules)
        .sort(([left], [right]) => left.localeCompare(right))
        .map(([ruleId, config]) => `- ${ruleId}: enabled=${config.enabled ?? true}, severity=${config.severity ?? 'default'}`)
        .join('\n');
    const dependencyBehavior = pack.dependencyRulesTemplate
        ? 'Includes dependency-rules template.'
        : 'No dependency-rules template.';
    const layerBehavior = pack.layerRulesTemplate
        ? 'Includes layer-rules template.'
        : 'No layer-rules template.';
    const recommendedAdrs = pack.recommendedAdrs.length > 0
        ? pack.recommendedAdrs.map((topic) => `- ${topic}`).join('\n')
        : '- (none)';
    const notes = pack.recommendedNotes.length > 0
        ? pack.recommendedNotes.map((note) => `- ${note}`).join('\n')
        : '- (none)';
    return `Rule Pack: ${pack.id}
Title: ${pack.title}
Description: ${pack.description}
Architecture style: ${pack.architectureStyle}

Rules affected:
${rules}

Dependency governance:
${dependencyBehavior}

Layer governance:
${layerBehavior}

Recommended ADRs:
${recommendedAdrs}

Notes:
${notes}
`;
}
function renderRulePackApplyConsole(result) {
    const written = result.filesWritten.map((filePath) => `- ${filePath}`).join('\n');
    return `Rule pack applied: ${result.appliedPackId}
Files written:
${written}

Recommendation: review generated configs and create ADRs for applicable recommended topics.
`;
}
//# sourceMappingURL=rulePackReporter.js.map