import { Track } from '@core/racing/domain/entities/Track';

export class RacingTrackFactory {
  create(): Track[] {
    // Only a subset of track images exist locally in `apps/website/public/images/tracks`.
    // Use a real local image for a few, and a stable local placeholder for the rest.
    const placeholderImageUrl = '/images/leagues/placeholder-cover.svg';

    return [
      // Road tracks - various difficulties
      Track.create({
        id: 'track-spa',
        name: 'Spa-Francorchamps',
        shortName: 'SPA',
        country: 'Belgium',
        category: 'road',
        difficulty: 'advanced',
        lengthKm: 7.004,
        turns: 19,
        imageUrl: '/images/tracks/spa.jpg',
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-monza',
        name: 'Autodromo Nazionale Monza',
        shortName: 'MON',
        country: 'Italy',
        category: 'road',
        difficulty: 'intermediate',
        lengthKm: 5.793,
        turns: 11,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-nurburgring',
        name: 'Nürburgring Grand Prix',
        shortName: 'NUR',
        country: 'Germany',
        category: 'road',
        difficulty: 'advanced',
        lengthKm: 5.148,
        turns: 15,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-silverstone',
        name: 'Silverstone Circuit',
        shortName: 'SIL',
        country: 'United Kingdom',
        category: 'road',
        difficulty: 'intermediate',
        lengthKm: 5.891,
        turns: 18,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-suzuka',
        name: 'Suzuka International Racing Course',
        shortName: 'SUZ',
        country: 'Japan',
        category: 'road',
        difficulty: 'expert',
        lengthKm: 5.807,
        turns: 18,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-laguna',
        name: 'WeatherTech Raceway Laguna Seca',
        shortName: 'LAG',
        country: 'United States',
        category: 'road',
        difficulty: 'advanced',
        lengthKm: 3.602,
        turns: 11,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-zandvoort',
        name: 'Circuit Zandvoort',
        shortName: 'ZAN',
        country: 'Netherlands',
        category: 'road',
        difficulty: 'intermediate',
        lengthKm: 4.259,
        turns: 14,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-imola',
        name: 'Autodromo Enzo e Dino Ferrari',
        shortName: 'IMO',
        country: 'Italy',
        category: 'road',
        difficulty: 'advanced',
        lengthKm: 4.909,
        turns: 19,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-le-mans',
        name: 'Circuit de la Sarthe',
        shortName: 'LEM',
        country: 'France',
        category: 'road',
        difficulty: 'expert',
        lengthKm: 13.626,
        turns: 38,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-hockenheim',
        name: 'Hockenheimring',
        shortName: 'HOC',
        country: 'Germany',
        category: 'road',
        difficulty: 'intermediate',
        lengthKm: 4.574,
        turns: 17,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      // Oval tracks
      Track.create({
        id: 'track-daytona',
        name: 'Daytona International Speedway',
        shortName: 'DAY',
        country: 'United States',
        category: 'oval',
        difficulty: 'intermediate',
        lengthKm: 4.023,
        turns: 4,
        imageUrl: '/images/tracks/daytona.jpg',
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-indianapolis',
        name: 'Indianapolis Motor Speedway',
        shortName: 'IMS',
        country: 'United States',
        category: 'oval',
        difficulty: 'advanced',
        lengthKm: 4.192,
        turns: 4,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-talladega',
        name: 'Talladega Superspeedway',
        shortName: 'TAL',
        country: 'United States',
        category: 'oval',
        difficulty: 'beginner',
        lengthKm: 4.280,
        turns: 4,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      // Street tracks
      Track.create({
        id: 'track-miami',
        name: 'Miami Street Circuit',
        shortName: 'MIA',
        country: 'United States',
        category: 'street',
        difficulty: 'intermediate',
        lengthKm: 5.410,
        turns: 19,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      Track.create({
        id: 'track-las-vegas',
        name: 'Las Vegas Street Circuit',
        shortName: 'VEG',
        country: 'United States',
        category: 'street',
        difficulty: 'advanced',
        lengthKm: 6.201,
        turns: 17,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
      // Dirt tracks
      Track.create({
        id: 'track-eldo',
        name: 'Eldora Speedway',
        shortName: 'ELD',
        country: 'United States',
        category: 'dirt',
        difficulty: 'beginner',
        lengthKm: 0.805,
        turns: 4,
        imageUrl: placeholderImageUrl,
        gameId: 'iracing',
      }),
    ];
  }
}