import type { DriverViewModel } from '@/lib/view-models/DriverViewModel'; import { Badge } from '@/ui/Badge'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { CountryFlag } from '@/ui/CountryFlag'; import { DriverRatingPill } from '@/components/drivers/DriverRatingPill'; import { Heading } from '@/ui/Heading'; import { Image } from '@/ui/Image'; import { PlaceholderImage } from '@/ui/PlaceholderImage'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; interface ProfileHeaderProps { driver: DriverViewModel; rating?: number | null; rank?: number | null; isOwnProfile?: boolean; onEditClick?: () => void; teamName?: string | null; teamTag?: string | null; } export function ProfileHeader({ driver, rating, rank, isOwnProfile = false, onEditClick, teamName, teamTag, }: ProfileHeaderProps) { return ( {driver.avatarUrl ? ( {driver.name} ) : ( )} {driver.name} {driver.country && } {teamTag && ( {teamTag} )} iRacing ID: {driver.iracingId} {teamName && ( {teamTag ? `[${teamTag}] ${teamName}` : teamName} )} {(typeof rating === 'number' || typeof rank === 'number') && ( )} {isOwnProfile && ( )} ); }