import { AvailableLeagueCard } from '@/components/sponsors/AvailableLeagueCard'; import { SponsorDashboardHeader } from '@/components/sponsors/SponsorDashboardHeader'; import { ViewData } from '@/lib/contracts/view-data/ViewData'; import { routes } from '@/lib/routing/RouteConfig'; import { siteConfig } from '@/lib/siteConfig'; import { Box } from '@/ui/Box'; import { Button } from '@/ui/Button'; import { Card } from '@/ui/Card'; import { Container } from '@/ui/Container'; import { Grid } from '@/ui/Grid'; import { GridItem } from '@/ui/GridItem'; import { Heading } from '@/ui/Heading'; import { Icon } from '@/ui/Icon'; import { Input } from '@/ui/Input'; import { Link } from '@/ui/Link'; import { Stack } from '@/ui/Stack'; import { Surface } from '@/ui/Surface'; import { Text } from '@/ui/Text'; import { Car, Megaphone, Search, Trophy, Users, } from 'lucide-react'; interface AvailableLeague { id: string; name: string; game: string; drivers: number; avgViewsPerRace: number; mainSponsorSlot: { available: boolean; price: number }; secondarySlots: { available: number; total: number; price: number }; rating: number; tier: 'premium' | 'standard' | 'starter'; nextRace?: string; seasonStatus: 'active' | 'upcoming' | 'completed'; description: string; formattedAvgViews: string; formattedCpm: string; cpm: number; } export type SortOption = 'rating' | 'drivers' | 'price' | 'views'; export type TierFilter = 'all' | 'premium' | 'standard' | 'starter'; export type AvailabilityFilter = 'all' | 'main' | 'secondary'; export interface SponsorLeaguesViewData extends ViewData { leagues: AvailableLeague[]; stats: { total: number; mainAvailable: number; secondaryAvailable: number; totalDrivers: number; avgCpm: number; }; } interface SponsorLeaguesTemplateProps { viewData: SponsorLeaguesViewData; filteredLeagues: AvailableLeague[]; searchQuery: string; setSearchQuery: (query: string) => void; } export function SponsorLeaguesTemplate({ viewData, filteredLeagues, searchQuery, setSearchQuery, }: SponsorLeaguesTemplateProps) { const stats = viewData.stats; return ( {/* Breadcrumb */} Dashboard / Browse Leagues {/* Header */} console.log('Refresh')} /> {/* Stats Overview */} {/* Filters (Simplified for template) */} Use the search and filter options to find the perfect league for your brand. setSearchQuery(e.target.value)} icon={} /> {/* Selects would go here, using standard Select UI if available */} {/* Results Count */} Showing {filteredLeagues.length} of {viewData.leagues.length} leagues {/* League Grid */} {filteredLeagues.length > 0 ? ( {filteredLeagues.map((league) => ( ))} ) : ( No leagues found Try adjusting your filters to see more results )} {/* Platform Fee Notice */} Platform Fee A {siteConfig.fees.platformFeePercent}% platform fee applies to all sponsorship payments. {siteConfig.fees.description} ); } function StatCard({ label, value, color = 'text-white' }: { label: string, value: string | number, color?: string }) { return ( {value} {label} ); }