import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsOptional } from 'class-validator';
import { DashboardDriverSummaryDTO } from './DashboardDriverSummaryDTO';
import { DashboardRaceSummaryDTO } from './DashboardRaceSummaryDTO';
import { DashboardRecentResultDTO } from './DashboardRecentResultDTO';
import { DashboardLeagueStandingSummaryDTO } from './DashboardLeagueStandingSummaryDTO';
import { DashboardFeedSummaryDTO } from './DashboardFeedSummaryDTO';
import { DashboardFriendSummaryDTO } from './DashboardFriendSummaryDTO';

export class DashboardOverviewDTO {
  @ApiProperty({ nullable: true })
  currentDriver!: DashboardDriverSummaryDTO | null;

  @ApiProperty({ type: [DashboardRaceSummaryDTO] })
  myUpcomingRaces!: DashboardRaceSummaryDTO[];

  @ApiProperty({ type: [DashboardRaceSummaryDTO] })
  otherUpcomingRaces!: DashboardRaceSummaryDTO[];

  @ApiProperty({ type: [DashboardRaceSummaryDTO] })
  upcomingRaces!: DashboardRaceSummaryDTO[];

  @ApiProperty()
  @IsNumber()
  activeLeaguesCount!: number;

  @ApiProperty({ nullable: true })
  nextRace!: DashboardRaceSummaryDTO | null;

  @ApiProperty({ type: [DashboardRecentResultDTO] })
  recentResults!: DashboardRecentResultDTO[];

  @ApiProperty({ type: [DashboardLeagueStandingSummaryDTO] })
  leagueStandingsSummaries!: DashboardLeagueStandingSummaryDTO[];

  @ApiProperty()
  feedSummary!: DashboardFeedSummaryDTO;

  @ApiProperty({ type: [DashboardFriendSummaryDTO] })
  friends!: DashboardFriendSummaryDTO[];
}