/**
* InterviewPlanPreview Component
*
* Displays a preview of the interview plan including:
* - Question breakdown by category
* - Estimated duration
* - Focus areas
* - Start Interview button
*/
import React from 'react';
function InterviewPlanPreview({
plan,
loading = false,
onStartInterview,
onRegenerate,
}) {
// Loading state
if (loading) {
return (
{/* Header */}
📋 Interview Plan Ready
{plan.difficulty_level}
For: {plan.target_role}
{plan.generation_source === 'mock' && (
Demo Mode
)}
{/* Quick Stats */}
📝
{plan.total_questions}
Questions
⏱️
{formatDuration(plan.total_questions * 3)}
Duration
{/* Question Breakdown */}
Question Breakdown
{plan.breakdown && Object.entries(plan.breakdown).map(([category, count]) => (
count > 0 && (
{getCategoryIcon(category)}
{category.charAt(0).toUpperCase() + category.slice(1)}
{count} question{count > 1 ? 's' : ''}
)
))}
{/* Focus Areas */}
{(plan.strength_focus_areas?.length > 0 || plan.weakness_focus_areas?.length > 0) && (
Focus Areas
{plan.strength_focus_areas?.slice(0, 2).map((area, idx) => (
💪
{area.area}
))}
{plan.weakness_focus_areas?.slice(0, 2).map((area, idx) => (
🎯
{area.area}
))}
)}
{/* Skills to Test */}
{plan.skills_to_test?.length > 0 && (
Skills to Be Tested
{plan.skills_to_test.slice(0, 8).map((skill, idx) => (
{skill}
))}
{plan.skills_to_test.length > 8 && (
+{plan.skills_to_test.length - 8} more
)}
)}
{/* Summary */}
{plan.summary && (
)}
{/* Actions */}
{onRegenerate && (
)}
{plan.is_used && (
This plan has already been used for an interview.
)}
);
}
export default InterviewPlanPreview;