'use client'; import { useState, useEffect } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import Card from '@/components/ui/Card'; import Button from '@/components/ui/Button'; import { Megaphone, Trophy, Users, Eye, Calendar, ExternalLink, Plus, ChevronRight, Check, Clock, XCircle } from 'lucide-react'; interface Sponsorship { id: string; leagueId: string; leagueName: string; tier: 'main' | 'secondary'; status: 'active' | 'pending' | 'expired'; startDate: Date; endDate: Date; price: number; impressions: number; drivers: number; } // Mock data - in production would come from repository const MOCK_SPONSORSHIPS: Sponsorship[] = [ { id: 'sp-1', leagueId: 'league-1', leagueName: 'GT3 Pro Championship', tier: 'main', status: 'active', startDate: new Date('2025-01-01'), endDate: new Date('2025-06-30'), price: 1200, impressions: 45200, drivers: 32, }, { id: 'sp-2', leagueId: 'league-2', leagueName: 'Endurance Masters', tier: 'main', status: 'active', startDate: new Date('2025-02-01'), endDate: new Date('2025-07-31'), price: 1000, impressions: 38100, drivers: 48, }, { id: 'sp-3', leagueId: 'league-3', leagueName: 'Formula Sim Series', tier: 'secondary', status: 'active', startDate: new Date('2025-03-01'), endDate: new Date('2025-08-31'), price: 400, impressions: 22800, drivers: 24, }, { id: 'sp-4', leagueId: 'league-4', leagueName: 'Touring Car Cup', tier: 'secondary', status: 'pending', startDate: new Date('2025-04-01'), endDate: new Date('2025-09-30'), price: 350, impressions: 0, drivers: 28, }, ]; function SponsorshipCard({ sponsorship }: { sponsorship: Sponsorship }) { const router = useRouter(); const statusConfig = { active: { icon: Check, color: 'text-performance-green', bg: 'bg-performance-green/10', label: 'Active' }, pending: { icon: Clock, color: 'text-warning-amber', bg: 'bg-warning-amber/10', label: 'Pending' }, expired: { icon: XCircle, color: 'text-gray-400', bg: 'bg-gray-400/10', label: 'Expired' }, }; const tierConfig = { main: { color: 'text-primary-blue', bg: 'bg-primary-blue/10', border: 'border-primary-blue/30', label: 'Main Sponsor' }, secondary: { color: 'text-purple-400', bg: 'bg-purple-400/10', border: 'border-purple-400/30', label: 'Secondary' }, }; const status = statusConfig[sponsorship.status]; const tier = tierConfig[sponsorship.tier]; const StatusIcon = status.icon; return (
{tier.label}
{status.label}

{sponsorship.leagueName}

Impressions
{sponsorship.impressions.toLocaleString()}
Drivers
{sponsorship.drivers}
Period
{sponsorship.startDate.toLocaleDateString('en-US', { month: 'short', year: 'numeric' })} - {sponsorship.endDate.toLocaleDateString('en-US', { month: 'short', year: 'numeric' })}
Investment
${sponsorship.price}
{Math.ceil((sponsorship.endDate.getTime() - Date.now()) / (1000 * 60 * 60 * 24))} days remaining
); } export default function SponsorCampaignsPage() { const router = useRouter(); const [filter, setFilter] = useState<'all' | 'active' | 'pending' | 'expired'>('all'); const filteredSponsorships = filter === 'all' ? MOCK_SPONSORSHIPS : MOCK_SPONSORSHIPS.filter(s => s.status === filter); const stats = { total: MOCK_SPONSORSHIPS.length, active: MOCK_SPONSORSHIPS.filter(s => s.status === 'active').length, pending: MOCK_SPONSORSHIPS.filter(s => s.status === 'pending').length, totalInvestment: MOCK_SPONSORSHIPS.reduce((sum, s) => sum + s.price, 0), }; return (
{/* Header */}

My Sponsorships

Manage your league sponsorships

{/* Stats */}
{stats.total}
Total Sponsorships
{stats.active}
Active
{stats.pending}
Pending
${stats.totalInvestment.toLocaleString()}
Total Investment
{/* Filters */}
{(['all', 'active', 'pending', 'expired'] as const).map((f) => ( ))}
{/* Sponsorship List */} {filteredSponsorships.length === 0 ? (

No sponsorships found

Start sponsoring leagues to grow your brand visibility

) : (
{filteredSponsorships.map((sponsorship) => ( ))}
)} {/* Alpha Notice */}

Alpha Note: Sponsorship data shown here is demonstration-only. Real sponsorship management will be available when the system is fully implemented.

); }