'use client'; import React from 'react'; import { Crown } from 'lucide-react'; import { Box } from '@/ui/Box'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Image } from '@/ui/Image'; import { Surface } from '@/ui/Surface'; interface PodiumDriver { id: string; name: string; avatarUrl: string; rating: number; wins: number; podiums: number; } interface RankingsPodiumProps { podium: PodiumDriver[]; onDriverClick?: (id: string) => void; } export function RankingsPodium({ podium, onDriverClick }: RankingsPodiumProps) { return ( {[1, 0, 2].map((index) => { const driver = podium[index]; if (!driver) return null; const position = index === 1 ? 1 : index === 0 ? 2 : 3; const config = { 1: { height: '10rem', color: 'rgba(250, 204, 21, 0.2)', borderColor: 'rgba(250, 204, 21, 0.4)', crown: '#facc15' }, 2: { height: '8rem', color: 'rgba(209, 213, 219, 0.2)', borderColor: 'rgba(209, 213, 219, 0.4)', crown: '#d1d5db' }, 3: { height: '6rem', color: 'rgba(217, 119, 6, 0.2)', borderColor: 'rgba(217, 119, 6, 0.4)', crown: '#d97706' }, }[position] || { height: '6rem', color: 'rgba(217, 119, 6, 0.2)', borderColor: 'rgba(217, 119, 6, 0.4)', crown: '#d97706' }; return ( onDriverClick?.(driver.id)} style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', backgroundColor: 'transparent', border: 'none', cursor: 'pointer' }} > {driver.name} {position} {driver.name} {driver.rating.toString()} 🏆 {driver.wins} 🏅 {driver.podiums} {position} ); })} ); }