import { ICONES } from '../../shared/icons.js';
export const SUGESTOES_COMANDOS = {
    usarFull: `${ICONES.feedback.dica} Use --full for a detailed report with all information`,
    usarJson: `${ICONES.feedback.dica} Use --json for structured JSON output`,
    combinarJsonExport: `${ICONES.feedback.dica} Combine --json with --export to save the report`,
    usarExport: `${ICONES.feedback.dica} Use --export <path> to save report to file`,
    usarInclude: `${ICONES.feedback.dica} Use --include <pattern> to focus on specific files`,
    usarExclude: `${ICONES.feedback.dica} Use --exclude <pattern> to ignore files`,
    usarDryRun: `${ICONES.feedback.dica} Use --dry-run to simulate without modifying files`,
    removerDryRun: `${ICONES.feedback.dica} Remove --dry-run to apply fixes`,
    usarInterativo: `${ICONES.feedback.dica} Use --interactive to confirm each fix`,
    usarGuardian: `${ICONES.feedback.dica} Use --guardian to verify integrity`,
    usarBaseline: `${ICONES.feedback.dica} Use --baseline to generate a reference baseline`,
    usarAutoFix: `${ICONES.feedback.dica} Use --auto-fix to apply automatic fixes`,
};
export const SUGESTOES_DIAGNOSTICO = {
    modoExecutivo: `${ICONES.diagnostico.executive} Executive mode: showing only critical problems`,
    primeiraVez: [
        `${ICONES.feedback.dica} First time? Start with: tutanus diagnosticar --full`,
        `${ICONES.feedback.dica} Use --help to see all available options`,
    ],
    projetoGrande: [
        `${ICONES.feedback.dica} Large project detected - use --include for incremental analysis`,
        `${ICONES.feedback.dica} Use --quick for a fast initial analysis`,
    ],
    poucoProblemas: `${ICONES.nivel.sucesso} Project in good shape! Only {count} minor problems found.`,
    muitosProblemas: [
        `${ICONES.feedback.atencao} Many problems found - prioritize critical ones first`,
        `${ICONES.feedback.dica} Use --executive to focus only on the essentials`,
    ],
    usarFiltros: `${ICONES.feedback.dica} Use --include/--exclude filters for focused analysis`,
};
export const SUGESTOES_AUTOFIX = {
    autoFixDisponivel: `${ICONES.feedback.dica} Automatic fixes available - use --auto-fix`,
    autoFixAtivo: `${ICONES.feedback.atencao} Auto-fix active! Use --dry-run to simulate without modifying files`,
    dryRunRecomendado: `${ICONES.feedback.dica} Recommended: test first with --dry-run`,
    semMutateFS: `${ICONES.feedback.atencao} Auto-fix currently unavailable`,
    validarDepois: [
        `${ICONES.feedback.dica} Run npm run lint to verify the fixes`,
        `${ICONES.feedback.dica} Run npm run build to check if the code compiles`,
        `${ICONES.feedback.dica} Run npm test to validate functionality`,
    ],
};
export const SUGESTOES_GUARDIAN = {
    guardianDesabilitado: `${ICONES.comando.guardian} Guardian disabled. Use --guardian to verify integrity`,
    primeiroBaseline: [
        `${ICONES.feedback.dica} First run: generate a baseline with --baseline`,
        `${ICONES.feedback.dica} The baseline serves as a reference for future changes`,
    ],
    driftDetectado: [
        `${ICONES.feedback.atencao} Changes detected compared to baseline`,
        `${ICONES.feedback.dica} Review the changes before updating the baseline`,
        `${ICONES.feedback.dica} Use --baseline to update reference`,
    ],
    integridadeOK: `${ICONES.nivel.sucesso} Integrity verified - no unauthorized changes`,
};
export const SUGESTOES_TIPOS = {
    ajustarConfianca: (atual) => `${ICONES.feedback.dica} Use --confidence <num> to adjust the threshold (current: ${atual}%)`,
    revisar: (categoria) => `${ICONES.feedback.dica} Review ${categoria} cases manually`,
    anyEncontrado: [
        `${ICONES.feedback.atencao} 'any' types detected - they reduce code safety`,
        `${ICONES.feedback.dica} Prioritize replacing 'as any' and explicit casts`,
    ],
    unknownLegitimo: `${ICONES.nivel.sucesso} Legitimate uses of 'unknown' identified`,
    melhoravelDisponivel: `${ICONES.feedback.dica} Improvable cases found - review in future refactoring`,
};
export const SUGESTOES_ARQUETIPOS = {
    monorepo: [
        `${ICONES.feedback.dica} Monorepo detected: consider using workspace filters`,
        `${ICONES.feedback.dica} Use --include packages/* to analyze specific workspaces`,
    ],
    biblioteca: [
        `${ICONES.feedback.dica} Library detected: focus on public exports and documentation`,
        `${ICONES.feedback.dica} Use --guardian to verify public API`,
    ],
    cli: [
        `${ICONES.feedback.dica} CLI detected: prioritize command and flag tests`,
        `${ICONES.feedback.dica} Validate error handling in commands`,
    ],
    api: [
        `${ICONES.feedback.dica} API detected: focus on endpoints and contracts`,
        `${ICONES.feedback.dica} Consider integration tests for routes`,
        `${ICONES.feedback.dica} Validate API documentation (OpenAPI/Swagger)`,
    ],
    frontend: [
        `${ICONES.feedback.dica} Frontend detected: prioritize components and state management`,
        `${ICONES.feedback.dica} Validate accessibility and performance`,
    ],
    confiancaBaixa: [
        `${ICONES.feedback.atencao} Low confidence in detection: structure may be hybrid`,
        `${ICONES.feedback.dica} Use --criar-arquetipo --salvar-arquetipo to customize`,
    ],
};
export const SUGESTOES_REESTRUTURAR = {
    backupRecomendado: [
        `${ICONES.feedback.importante} IMPORTANT: Make a backup before restructuring!`,
        `${ICONES.feedback.dica} Use git to version before structural changes`,
    ],
    validarDepois: [
        `${ICONES.feedback.dica} Run tests after restructuring`,
        `${ICONES.feedback.dica} Validate imports and references`,
    ],
    usarDryRun: `${ICONES.feedback.dica} First time? Use --dry-run to see proposed changes`,
};
export const SUGESTOES_PODAR = {
    cuidado: [
        `${ICONES.feedback.atencao} Pruning permanently removes files!`,
        `${ICONES.feedback.importante} Make sure you have backup or version control`,
    ],
    revisar: `${ICONES.feedback.dica} Review the file list before confirming`,
    usarDryRun: `${ICONES.feedback.dica} Use --dry-run to simulate pruning without deleting`,
};
export const SUGESTOES_METRICAS = {
    baseline: [
        `${ICONES.feedback.dica} Generate baseline for future comparisons`,
        `${ICONES.feedback.dica} Use --json for CI/CD integration`,
    ],
    tendencias: `${ICONES.feedback.dica} Run regularly to track trends`,
    comparacao: `${ICONES.feedback.dica} Compare with previous runs`,
};
export const SUGESTOES_ZELADOR = {
    imports: [
        `${ICONES.feedback.dica} Import caretaker automatically fixes paths`,
        `${ICONES.feedback.dica} Use --dry-run to see proposed fixes`,
    ],
    estrutura: [
        `${ICONES.feedback.dica} Structure caretaker organizes files by pattern`,
        `${ICONES.feedback.dica} Configure patterns in tutanus.config.json`,
    ],
};
export function gerarSugestoesContextuais(contexto) {
    const sugestoes = [];
    switch (contexto.comando) {
        case 'diagnosticar':
            if (!contexto.temProblemas) {
                if (contexto.countProblemas !== undefined) {
                    sugestoes.push(SUGESTOES_DIAGNOSTICO.poucoProblemas.replace('{count}', String(contexto.countProblemas)));
                }
            }
            else if (contexto.countProblemas && contexto.countProblemas > 50) {
                sugestoes.push(...SUGESTOES_DIAGNOSTICO.muitosProblemas);
            }
            if (contexto.autoFixDisponivel &&
                !contexto.flags?.includes('--auto-fix')) {
                sugestoes.push(SUGESTOES_AUTOFIX.autoFixDisponivel);
            }
            if (!contexto.guardianAtivo && !contexto.flags?.includes('--guardian')) {
                sugestoes.push(SUGESTOES_GUARDIAN.guardianDesabilitado);
            }
            if (!contexto.flags?.includes('--full') && contexto.temProblemas) {
                sugestoes.push(SUGESTOES_COMANDOS.usarFull);
            }
            break;
        case 'fix-types':
            if (contexto.autoFixDisponivel) {
                sugestoes.push(...SUGESTOES_AUTOFIX.validarDepois);
            }
            break;
        case 'reestruturar':
            sugestoes.push(...SUGESTOES_REESTRUTURAR.backupRecomendado);
            if (!contexto.flags?.includes('--dry-run')) {
                sugestoes.push(SUGESTOES_REESTRUTURAR.usarDryRun);
            }
            break;
        case 'podar':
            sugestoes.push(...SUGESTOES_PODAR.cuidado);
            break;
    }
    if (contexto.arquetipo) {
        switch (contexto.arquetipo) {
            case 'monorepo':
                sugestoes.push(...SUGESTOES_ARQUETIPOS.monorepo);
                break;
            case 'biblioteca':
                sugestoes.push(...SUGESTOES_ARQUETIPOS.biblioteca);
                break;
            case 'cli':
                sugestoes.push(...SUGESTOES_ARQUETIPOS.cli);
                break;
            case 'api':
                sugestoes.push(...SUGESTOES_ARQUETIPOS.api);
                break;
            case 'frontend':
                sugestoes.push(...SUGESTOES_ARQUETIPOS.frontend);
                break;
        }
    }
    return sugestoes;
}
export function formatarSugestoes(sugestoes, titulo = 'Suggestions') {
    if (sugestoes.length === 0)
        return [];
    const linhas = ['', `┌── ${titulo} ${'─'.repeat(50)}`.slice(0, 70)];
    for (const sugestao of sugestoes) {
        linhas.push(`  ${sugestao}`);
    }
    linhas.push(`└${'─'.repeat(68)}`);
    linhas.push('');
    return linhas;
}
export const SUGESTOES = {
    comandos: SUGESTOES_COMANDOS,
    diagnostico: SUGESTOES_DIAGNOSTICO,
    autofix: SUGESTOES_AUTOFIX,
    guardian: SUGESTOES_GUARDIAN,
    tipos: SUGESTOES_TIPOS,
    arquetipos: SUGESTOES_ARQUETIPOS,
    reestruturar: SUGESTOES_REESTRUTURAR,
    podar: SUGESTOES_PODAR,
    metricas: SUGESTOES_METRICAS,
    zelador: SUGESTOES_ZELADOR,
};
//# sourceMappingURL=suggestions.js.map