import React, { ReactNode } from 'react'; import { Box } from './Box'; import { Stack } from './Stack'; import { Text } from './Text'; import { DriverIdentity } from './DriverIdentity'; import { DriverViewModel } from '@/lib/view-models/DriverViewModel'; interface TeamRosterItemProps { driver: DriverViewModel; href: string; roleLabel: string; joinedAt: string | Date; rating: number | null; overallRank: number | null; actions?: ReactNode; } export function TeamRosterItem({ driver, href, roleLabel, joinedAt, rating, overallRank, actions, }: TeamRosterItemProps) { return ( {driver.country} • Joined {new Date(joinedAt).toLocaleDateString()} } size="md" /> {rating !== null && ( {rating} Rating {overallRank !== null && ( #{overallRank} Rank )} )} {actions && ( {actions} )} ); }