{#if analyzedResult}
Confidence: {Math.round(analyzedResult.confidence * 100)}%
{/if}
{#if error}
❌ {error}
{/if}
{#if analyzedResult}
{#if selectedTab === 'previous'}

📚 Structured Previous Answers

Found {analyzedResult.previousAnswers.length} relevant previous RFP responses

{#each analyzedResult.previousAnswers as answer, idx}

{answer.source}

{answer.category} Relevance: {Math.round(answer.relevanceScore * 100)}%
{#if answer.keyPoints.length > 0}
🎯 Key Points:
    {#each answer.keyPoints.slice(0, 5) as point}
  • {point}
  • {/each}
{/if} {#if answer.metrics.length > 0}
📊 Metrics Found:
{#each answer.metrics.slice(0, 6) as metric}
{metric.value} {metric.context.substring(0, 80)}...
{/each}
{/if}
View Full Content ({answer.content.length} characters)
{answer.content}
{/each}
{/if} {#if selectedTab === 'ai'}
Word Count: {analyzedResult.aiGeneratedAnswer.wordCount}
Tone: {analyzedResult.aiGeneratedAnswer.tone}
Comprehensiveness: {Math.round(analyzedResult.aiGeneratedAnswer.comprehensiveness * 100)}%
{#if analyzedResult.aiGeneratedAnswer.addressedPoints.length > 0}
✅ Addressed Requirements:
{#each analyzedResult.aiGeneratedAnswer.addressedPoints as point} {point} {/each}
{/if} {#if analyzedResult.aiGeneratedAnswer.strengths.length > 0}
💪 Answer Strengths:
    {#each analyzedResult.aiGeneratedAnswer.strengths as strength}
  • ✓ {strength}
  • {/each}
{/if}

🤖 Generated RFP Response:

{@html analyzedResult.aiGeneratedAnswer.answer.replace(/\n/g, '
')}
{#if analyzedResult.aiGeneratedAnswer.citations.length > 0}
📚 Citations:
    {#each analyzedResult.aiGeneratedAnswer.citations as citation}
  • {citation}
  • {/each}
{/if}
{/if} {#if selectedTab === 'gaps'}

Overall Coverage: {Math.round(analyzedResult.gapAnalysis.overallCoverage * 100)}%

{#if analyzedResult.gapAnalysis.coveredPoints.length > 0}

✅ Covered Requirements ({analyzedResult.gapAnalysis.coveredPoints.length})

{#each analyzedResult.gapAnalysis.coveredPoints as point}
{point.point} {Math.round(point.confidence * 100)}% confidence
Source: {point.source}
{#if point.evidence}
"{point.evidence}..."
{/if}
{/each}
{/if} {#if analyzedResult.gapAnalysis.missingPoints.length > 0}

⚠️ Missing Requirements ({analyzedResult.gapAnalysis.missingPoints.length})

{#each analyzedResult.gapAnalysis.missingPoints as point}
{point.point} {point.importance.toUpperCase()}
Suggestion: {point.suggestion}
{#if point.examples && point.examples.length > 0}
View Examples
    {#each point.examples as example}
  • {example}
  • {/each}
{/if}
{/each}
{/if} {#if analyzedResult.gapAnalysis.weakPoints.length > 0}

🔧 Areas Needing Improvement ({analyzedResult.gapAnalysis.weakPoints.length})

{#each analyzedResult.gapAnalysis.weakPoints as point}
{point.point}
Current: {point.currentCoverage}
Needed: {point.improvementNeeded}
{#if point.suggestions.length > 0}
    {#each point.suggestions as suggestion}
  • → {suggestion}
  • {/each}
{/if}
{/each}
{/if} {#if analyzedResult.gapAnalysis.recommendations.length > 0}

📋 Recommendations

    {#each analyzedResult.gapAnalysis.recommendations as recommendation}
  • {recommendation}
  • {/each}
{/if}
{/if} {#if selectedTab === 'suggestions'}

💡 Actionable Suggestions

Follow these suggestions to improve your RFP response

{#each analyzedResult.suggestions as suggestion, idx}
{idx + 1}
{suggestion}
{/each}
{#if analyzedResult.suggestions.length === 0}
✅ Your response is comprehensive! No additional suggestions needed.
{/if}
{/if}
{/if}