'use client'; import { motion } from 'framer-motion'; import { cn } from '../utils/cn'; export interface ScoreCircleProps { score: number; progress?: number; isInView?: boolean; size?: 'sm' | 'md' | 'lg' | 'xl'; showLabel?: boolean; className?: string; } export function ScoreCircle({ score, progress: customProgress, isInView = true, size = 'md', showLabel = true, className, }: ScoreCircleProps) { const progress = customProgress ?? score; const getScoreColor = () => { if (score >= 80) return { stroke: '#10b981', glow: 'rgba(16, 185, 129, 0.3)' }; if (score >= 60) return { stroke: '#eab308', glow: 'rgba(234, 179, 8, 0.3)' }; return { stroke: '#ef4444', glow: 'rgba(239, 68, 68, 0.3)' }; }; const scoreColor = getScoreColor(); const sizeMap = { sm: 'w-32 h-32', md: 'w-48 h-48', lg: 'w-64 h-64', xl: 'w-80 h-80', }; const textMap = { sm: { score: 'text-3xl', label: 'text-[8px]', title: 'text-sm' }, md: { score: 'text-5xl', label: 'text-[10px]', title: 'text-lg' }, lg: { score: 'text-6xl', label: 'text-xs', title: 'text-xl' }, xl: { score: 'text-7xl', label: 'text-sm', title: 'text-2xl' }, }; const currentSize = sizeMap[size]; const currentText = textMap[size]; return (