"use client" import type { Feedback, Question } from "@/lib/types" import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Progress } from "@/components/ui/progress" import { Button } from "@/components/ui/button" import { CheckCircle2, XCircle } from "lucide-react" interface FeedbackPanelProps { feedback: Feedback nextQuestion: Question | null testCompleted: boolean onContinue: () => void onStartNewTest: () => void } export function FeedbackPanel({ feedback, nextQuestion, testCompleted, onContinue, onStartNewTest, }: FeedbackPanelProps) { return ( Feedback {feedback.correct ? ( Correct ) : ( Incorrect )}

Confidence Score: {Math.round(feedback.confidence_score * 100)}%

0.7 ? "bg-success" : feedback.confidence_score > 0.4 ? "bg-warning" : "bg-destructive" } />
{feedback.correct_answer && (
Correct Answer: {feedback.correct_answer}
)}
Explanation: {feedback.explanation}
{testCompleted ? ( ) : ( )}
) }