'use client';
import React from 'react';
import { Box } from '@/ui/Box';
import { Stack } from '@/ui/Stack';
import { Text } from '@/ui/Text';
import { Surface } from '@/ui/Surface';
import { Icon } from '@/ui/Icon';
import { Table, TableHead, TableBody, TableRow, TableHeader, TableCell } from '@/ui/Table';
import { Trophy, TrendingUp } from 'lucide-react';
interface StandingsEntry {
position: number;
driverName: string;
points: number;
wins: number;
podiums: number;
change?: number;
}
interface StandingsTableShellProps {
standings: StandingsEntry[];
title?: string;
}
export function StandingsTableShell({ standings, title = 'Championship Standings' }: StandingsTableShellProps) {
return (
{title.toUpperCase()}
{standings.length} Drivers
Pos
Driver
Wins
Podiums
Points
{standings.map((entry) => (
{entry.driverName}
{entry.change !== undefined && entry.change !== 0 && (
0 ? 'text-performance-green' : 'text-error-red'}
transform={entry.change < 0 ? 'rotate(180deg)' : undefined}
/>
0 ? 'text-performance-green' : 'text-error-red'}>
{Math.abs(entry.change)}
)}
0 ? 'text-white' : 'text-gray-500'}>{entry.wins}
0 ? 'text-white' : 'text-gray-500'}>{entry.podiums}
{entry.points}
))}
);
}
function PositionBadge({ position }: { position: number }) {
const isPodium = position <= 3;
const colors = {
1: 'text-warning-amber bg-warning-amber/10 border-warning-amber/20',
2: 'text-gray-300 bg-gray-300/10 border-gray-300/20',
3: 'text-orange-400 bg-orange-400/10 border-orange-400/20',
};
return (
{position}
);
}