import { LeagueRepository } from '../ports/LeagueRepository'; import { DriverRepository } from '../../../racing/domain/repositories/DriverRepository'; import { EventPublisher } from '../../../shared/ports/EventPublisher'; import { LeaveLeagueCommand } from '../ports/LeaveLeagueCommand'; export class LeaveLeagueUseCase { constructor( private readonly leagueRepository: LeagueRepository, private readonly driverRepository: DriverRepository, private readonly eventPublisher: EventPublisher, ) {} async execute(command: LeaveLeagueCommand): Promise { await this.leagueRepository.removeLeagueMember(command.leagueId, command.driverId); } }