import { CheckCircle, XCircle, Loader2 } from "lucide-react"; import { useEffect } from "react"; export const checks = [ { label: "VRM", key: "vrm" }, { label: "LLM", key: "chatbot" }, { label: "TTS", key: "tts" }, { label: "STT", key: "stt" }, { label: "Vision", key: "vision" }, { label: "AmicaLife", key: "amicaLife" }, ] as const; export type CheckKey = typeof checks[number]["key"]; export type Status = { status: "idle" | "loading" | "pass" | "fail", score: number }; export type DiagnosisResultType = { [key in CheckKey]: Status; } & { overall?: string; }; interface DiagnosisResultProps { label: string; status: Status; } export const DiagnosisResult = ({ label, status }: DiagnosisResultProps) => { const statusIcon = { pass: , fail: , loading: , idle:
, }; const statusColor = { pass: "text-green-600", fail: "text-red-600", loading: "text-gray-500", idle: "text-gray-400", }; return (
{statusIcon[status.status]}
{/* Label and status */}
{label} {status.status === "idle" ? "Not checked" : status.score >= 0 ? `Score: ${status.score}` : "N/A"}
{/* Each evaluation criteria */}
); };