namespace Backend.Contracts;

public sealed record TimelineItem(
    string Key,
    string Title,
    DateOnly StartsAt,
    DateOnly EndsAt,
    string State);

public sealed record FeaturedCategoryDto(
    int Id,
    string GroupName,
    string Name,
    string Description,
    int MaxNomineesPerUser);

public sealed record WinnerPreviewDto(
    int Year,
    string Category,
    string WinnerName,
    string WinnerSlug);

public sealed record FaqItemDto(string Question, string Answer);

public sealed record OverviewResponse(
    int SeasonId,
    int Year,
    string Title,
    DateOnly ShowDate,
    string CurrentPhase,
    bool IsCommunityOnly,
    string LoginProvider,
    IEnumerable<TimelineItem> Timeline,
    IEnumerable<FeaturedCategoryDto> FeaturedCategories,
    IEnumerable<WinnerPreviewDto> WinnersPreview,
    IEnumerable<FaqItemDto> Faq);

public sealed record CandidateSummaryDto(
    int Id,
    string DisplayName,
    string ChannelSlug,
    string Platform);

public sealed record PublicCategoryDetailDto(
    int Id,
    string Name,
    string GroupName,
    string Description,
    int MaxNomineesPerUser,
    IEnumerable<CandidateSummaryDto> Candidates);

public sealed record SeasonCategoriesResponse(
    int SeasonId,
    int Year,
    IEnumerable<PublicCategoryDetailDto> Categories);

public sealed record WinnerArchiveItemDto(
    string Category,
    string WinnerName,
    string WinnerSlug);

public sealed record WinnerArchiveResponse(
    int Year,
    IEnumerable<WinnerArchiveItemDto> Items);

public sealed record CreateNominationRequest(
    int Year,
    int CategoryId,
    string TwitchUserId,
    string[] Nominees);

public sealed record VoteEntryRequest(
    int CategoryId,
    int CandidateId);

public sealed record CreateVoteRequest(
    int SeasonId,
    string TwitchUserId,
    VoteEntryRequest[] Entries);

public sealed record CreateClipRequest(
    int Year,
    int? CategoryId,
    string TwitchUserId,
    string ClipUrl,
    string Title,
    string Creator);
