import { ApiProperty } from '@nestjs/swagger';
import { IsString } from 'class-validator';
import { ActivityItemDTO } from './ActivityItemDTO';
import { RenewalAlertDTO } from './RenewalAlertDTO';
import { SponsorDashboardInvestmentDTO } from './SponsorDashboardInvestmentDTO';
import { SponsorDashboardMetricsDTO } from './SponsorDashboardMetricsDTO';
import { SponsoredLeagueDTO } from './SponsoredLeagueDTO';
import { SponsorshipDTO } from './SponsorshipDTO';

export class SponsorDashboardDTO {
  @ApiProperty()
  @IsString()
  sponsorId: string = '';

  @ApiProperty()
  @IsString()
  sponsorName: string = '';

  @ApiProperty({ type: SponsorDashboardMetricsDTO })
  metrics: SponsorDashboardMetricsDTO = new SponsorDashboardMetricsDTO();

  @ApiProperty({ type: [SponsoredLeagueDTO] })
  sponsoredLeagues: SponsoredLeagueDTO[] = [];

  @ApiProperty({ type: SponsorDashboardInvestmentDTO })
  investment: SponsorDashboardInvestmentDTO = new SponsorDashboardInvestmentDTO();

  @ApiProperty({ type: Object })
  sponsorships: {
    leagues: SponsorshipDTO[];
    teams: SponsorshipDTO[];
    drivers: SponsorshipDTO[];
    races: SponsorshipDTO[];
    platform: SponsorshipDTO[];
  } = {
    leagues: [],
    teams: [],
    drivers: [],
    races: [],
    platform: []
  };

  @ApiProperty({ type: [ActivityItemDTO] })
  recentActivity: ActivityItemDTO[] = [];

  @ApiProperty({ type: [RenewalAlertDTO] })
  upcomingRenewals: RenewalAlertDTO[] = [];
}