"use client" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { Progress } from "@/components/ui/progress" import { Brain, Lightbulb, Target, TrendingUp, Search, Star } from "lucide-react" interface CombinedAnalysisProps { overallScore: number logicScore: number creativityScore: number balanceScore: number level: string description: string logicBreakdown?: any creativityBreakdown?: any // 個別測試結果的詳細資料 logicCorrectAnswers?: number logicTotalQuestions?: number logicLevel?: string logicDescription?: string logicSuggestion?: string creativityTotalScore?: number creativityMaxScore?: number creativityLevel?: string creativityDescription?: string creativitySuggestion?: string } export function CombinedAnalysis({ overallScore, logicScore, creativityScore, balanceScore, level, description, logicBreakdown, creativityBreakdown, // 個別測試結果的詳細資料 logicCorrectAnswers, logicTotalQuestions, logicLevel, logicDescription, logicSuggestion, creativityTotalScore, creativityMaxScore, creativityLevel, creativityDescription, creativitySuggestion }: CombinedAnalysisProps) { // 獲取等級顏色 const getLevelColor = (score: number) => { if (score >= 90) return "bg-gradient-to-r from-purple-500 to-blue-500" if (score >= 80) return "bg-gradient-to-r from-blue-500 to-green-500" if (score >= 70) return "bg-gradient-to-r from-green-500 to-yellow-500" if (score >= 60) return "bg-gradient-to-r from-yellow-500 to-orange-500" return "bg-gradient-to-r from-orange-500 to-red-500" } // 獲取能力狀態 const getAbilityStatus = (score: number) => { if (score >= 80) return { text: "表現優秀", color: "text-green-600" } if (score >= 60) return { text: "表現良好", color: "text-blue-600" } if (score >= 40) return { text: "需要提升", color: "text-yellow-600" } return { text: "需要加強", color: "text-red-600" } } // 獲取平衡狀態 const getBalanceStatus = (score: number) => { if (score >= 80) return { text: "非常均衡", color: "text-green-600" } if (score >= 60) return { text: "相對均衡", color: "text-blue-600" } if (score >= 40) return { text: "需要平衡", color: "text-yellow-600" } return { text: "失衡嚴重", color: "text-red-600" } } // 生成發展建議 const getRecommendations = () => { const recommendations = [] if (logicScore < 70) { recommendations.push("建議加強邏輯思維訓練,多做推理題和數學題") recommendations.push("學習系統性思維方法,如思維導圖、流程圖等") } if (creativityScore < 70) { recommendations.push("建議參與更多創意活動,如頭腦風暴、設計思維工作坊") recommendations.push("培養好奇心,多接觸不同領域的知識和經驗") } const scoreDiff = Math.abs(logicScore - creativityScore) if (scoreDiff > 20) { if (logicScore > creativityScore) { recommendations.push("您的邏輯思維較強,建議平衡發展創意能力") } else { recommendations.push("您的創意能力較強,建議平衡發展邏輯思維") } } if (logicScore >= 80 && creativityScore >= 80) { recommendations.push("您具備優秀的綜合能力,建議承擔更多挑戰性工作") recommendations.push("可以考慮擔任需要創新和分析並重的領導角色") } return recommendations.length > 0 ? recommendations : ["繼續保持現有的學習節奏,持續提升各方面能力"] } const recommendations = getRecommendations() const logicStatus = getAbilityStatus(logicScore) const creativityStatus = getAbilityStatus(creativityScore) const balanceStatus = getBalanceStatus(balanceScore) return (
{/* 綜合評估概覽 */}
{overallScore}
綜合評估完成!
{level}

{description}

{/* 個別測試結果 */} {(logicCorrectAnswers !== undefined || creativityTotalScore !== undefined) && (
{/* 邏輯思維測試 */} {logicCorrectAnswers !== undefined && ( 邏輯思維測試
{/* 分數顯示 */}
得分
{logicScore}
{/* 統計數據 */}
{logicCorrectAnswers}
答對題數
{logicTotalQuestions}
總題數
{/* 等級和描述 */}
{logicLevel}

{logicDescription}

建議:

{logicSuggestion}

)} {/* 創意能力測試 */} {creativityTotalScore !== undefined && ( 創意能力測試
{/* 分數顯示 */}
得分
{creativityScore}
{/* 統計數據 */}
{creativityTotalScore}
原始得分
{creativityMaxScore}
滿分
{/* 等級和描述 */}
{creativityLevel}

{creativityDescription}

建議:

{creativitySuggestion}

)}
)} {/* 能力分析 */} 能力分析
{/* 邏輯思維 */}

邏輯思維

{logicScore}
{logicStatus.text}
{/* 創意能力 */}

創意能力

{creativityScore}
{creativityStatus.text}
{/* 能力平衡 */}

能力平衡

{balanceScore}
{balanceStatus.text}
{/* 發展建議 */} 發展建議
{recommendations.map((recommendation, index) => (
{index + 1}

{recommendation}

))}
) }