import { RacesApiClient } from '@/lib/api/races/RacesApiClient'; /** * Race Service - DTO Only * * Returns raw API DTOs. No ViewModels or UX logic. * All client-side presentation logic must be handled by hooks/components. */ export class RaceService { constructor(private readonly apiClient: RacesApiClient) {} async getRaceById(raceId: string): Promise { // This would need a driverId, but for now we'll use a placeholder return this.apiClient.getDetail(raceId, 'placeholder-driver-id'); } async getRacesByLeagueId(leagueId: string): Promise { return this.apiClient.getPageData(leagueId); } async findByLeagueId(leagueId: string): Promise { const result = await this.apiClient.getPageData(leagueId); return result.races || []; } }