import { Result } from '@/lib/contracts/Result'; import { Service } from '@/lib/contracts/services/Service'; import { RulebookApiDto } from '@/lib/types/tbd/RulebookApiDto'; export class LeagueRulebookService implements Service { async getRulebookData(leagueId: string): Promise> { // Mock data since backend not implemented const mockData: RulebookApiDto = { leagueId, scoringConfig: { gameName: 'iRacing', scoringPresetName: 'Custom Rules', championships: [ { type: 'driver', sessionTypes: ['Race'], pointsPreview: [ { sessionType: 'Race', position: 1, points: 25 }, { sessionType: 'Race', position: 2, points: 20 }, { sessionType: 'Race', position: 3, points: 16 }, ], bonusSummary: ['Pole Position: +1', 'Fastest Lap: +1'], } ], dropPolicySummary: 'All results count', }, }; return Result.ok(mockData); } }