import { Badge } from '@/ui/Badge';
import { Card } from '@/ui/Card';
import { Heading } from '@/ui/Heading';
import { Grid } from '@/ui/primitives/Grid';
import { Stack } from '@/ui/primitives/Stack';
import { StatItem } from '@/ui/StatItem';

interface StandingsItemProps {
  leagueName: string;
  position: number;
  points: number;
  wins: number;
  racesCompleted: number;
}

export function StandingsItem({
  leagueName,
  position,
  points,
  wins,
  racesCompleted,
}: StandingsItemProps) {
  return (
    <Card
      variant="default"
      p={4}
    >
      <Stack direction="row" align="center" justify="between" mb={3}>
        <Heading level={4}>
          {leagueName}
        </Heading>
        <Badge variant="primary">
          P{position}
        </Badge>
      </Stack>
      
      <Grid cols={3} gap={4}>
        <StatItem label="Points" value={points} align="center" />
        <StatItem label="Wins" value={wins} align="center" />
        <StatItem label="Races" value={racesCompleted} align="center" />
      </Grid>
    </Card>
  );
}
