'use client'; import { mediaConfig } from '@/lib/config/mediaConfig'; import { CountryFlagDisplay } from '@/lib/display-objects/CountryFlagDisplay'; import { Button } from '@/ui/Button'; import { Heading } from '@/ui/Heading'; import { Image } from '@/ui/Image'; import { ProfileHero, ProfileAvatar, ProfileStatsGroup, ProfileStat } from '@/ui/ProfileHero'; import { Text } from '@/ui/Text'; import { Box } from '@/ui/Box'; import { Group } from '@/ui/Group'; import { Stack } from '@/ui/Stack'; import { Calendar, Globe, Star, Trophy, UserPlus } from 'lucide-react'; import React from 'react'; interface ProfileHeaderProps { driver: { name: string; avatarUrl?: string; country: string; iracingId: number; joinedAtLabel: string; }; stats: { ratingLabel: string; } | null; globalRankLabel: string; onAddFriend?: () => void; friendRequestSent?: boolean; isOwnProfile?: boolean; } export function ProfileHeader({ driver, stats, globalRankLabel, onAddFriend, friendRequestSent, isOwnProfile, }: ProfileHeaderProps) { return ( {driver.name} {driver.name} {CountryFlagDisplay.fromCountryCode(driver.country).toString()} ID: {driver.iracingId} Joined {driver.joinedAtLabel} {stats && ( )} {!isOwnProfile && onAddFriend && ( )} ); }