'use client'; import { mediaConfig } from '@/lib/config/mediaConfig'; import { CountryFlagFormatter } from '@/lib/formatters/CountryFlagFormatter'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { Group } from '@/ui/Group'; import { Heading } from '@/ui/Heading'; import { Image } from '@/ui/Image'; import { ProfileAvatar, ProfileHero, ProfileStat, ProfileStatsGroup } from '@/ui/ProfileHero'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Calendar, Globe, 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} {CountryFlagFormatter.fromCountryCode(driver.country).toString()} ID: {driver.iracingId} Joined {driver.joinedAtLabel} {stats && ( )} {!isOwnProfile && onAddFriend && ( )} ); }