'use client'; import { UploadDropzone } from '@/components/media/UploadDropzone'; import { routes } from '@/lib/routing/RouteConfig'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { Card } from '@/ui/Card'; import { Container } from '@/ui/Container'; import { Heading } from '@/ui/Heading'; import { MediaMetaPanel, mapMediaMetadata } from '@/ui/MediaMetaPanel'; import { MediaPreviewCard } from '@/ui/MediaPreviewCard'; import { Text } from '@/ui/Text'; import Link from 'next/link'; import { useState } from 'react'; export function ProfileLiveryUploadPageClient() { const [selectedFile, setSelectedFile] = useState(null); const [previewUrl, setPreviewUrl] = useState(null); const [isUploading, setIsUploading] = useState(false); const handleFilesSelected = (files: File[]) => { if (files.length > 0) { const file = files[0]; setSelectedFile(file); const url = URL.createObjectURL(file); setPreviewUrl(url); } else { setSelectedFile(null); setPreviewUrl(null); } }; const handleUpload = async () => { if (!selectedFile) return; setIsUploading(true); // Mock upload delay await new Promise(resolve => setTimeout(resolve, 2000)); setIsUploading(false); alert('Livery uploaded successfully! (Mock)'); }; return ( Upload livery Upload your custom car livery. Supported formats: .png, .jpg, .tga {previewUrl ? ( ) : ( Select a file to see preview and details )} ); }