import { Box, Paper, Typography, Card, CardContent, Chip, Grid, Avatar } from '@mui/material'; import { useTheme, alpha } from '@mui/material/styles'; import EmojiEventsIcon from '@mui/icons-material/EmojiEvents'; import { useTranslation } from 'react-i18next'; import { blindTestStyles } from '@/styles/blindTest'; export default function ResultSummary({ stats, modelInfo }) { const { t } = useTranslation(); const theme = useTheme(); if (!stats) return null; const totalScore = stats.modelAScore + stats.modelBScore; const modelAPercent = totalScore > 0 ? (stats.modelAScore / totalScore) * 100 : 50; const modelBPercent = totalScore > 0 ? (stats.modelBScore / totalScore) * 100 : 50; const winner = stats.modelAScore > stats.modelBScore ? 'A' : stats.modelBScore > stats.modelAScore ? 'B' : 'tie'; return ( {t('blindTest.resultSummary', '评测结果汇总')} {/* Model A */} {winner === 'A' && ( WINNER )} A {modelInfo?.modelA?.modelName || 'Model A'} {stats.modelAScore.toFixed(1)} {t('blindTest.wins', '胜出')}: {stats.modelAWins} {/* VS / Progress */} VS {/* Model B */} {winner === 'B' && ( WINNER )} B {modelInfo?.modelB?.modelName || 'Model B'} {stats.modelBScore.toFixed(1)} {t('blindTest.wins', '胜出')}: {stats.modelBWins} {/* 底部统计条 */} {stats.totalQuestions} {t('blindTest.totalQuestions', '总题数')} {stats.bothGood} {t('blindTest.bothGood', '都好')} {stats.bothBad} {t('blindTest.bothBad', '都不好')} {stats.ties} {t('blindTest.ties', '平局')} ); }