using System;
using API.Entities.Enums;
using API.Entities.Interfaces;
namespace API.DTOs.ReadingLists;
#nullable enable
public sealed record ReadingListDto : IHasCoverImage
{
    public int Id { get; init; }
    public string Title { get; set; } = default!;
    public string Summary { get; set; } = default!;
    /// 
    /// Reading lists that are promoted are only done by admins
    /// 
    public bool Promoted { get; set; }
    public bool CoverImageLocked { get; set; }
    /// 
    /// This is used to tell the UI if it should request a Cover Image or not. If null or empty, it has not been set.
    /// 
    public string? CoverImage { get; set; } = string.Empty;
    public string? PrimaryColor { get; set; } = string.Empty;
    public string? SecondaryColor { get; set; } = string.Empty;
    /// 
    /// Number of Items in the Reading List
    /// 
    public int ItemCount { get; set; }
    /// 
    /// Minimum Year the Reading List starts
    /// 
    public int StartingYear { get; set; }
    /// 
    /// Minimum Month the Reading List starts
    /// 
    public int StartingMonth { get; set; }
    /// 
    /// Maximum Year the Reading List starts
    /// 
    public int EndingYear { get; set; }
    /// 
    /// Maximum Month the Reading List starts
    /// 
    public int EndingMonth { get; set; }
    /// 
    /// The highest age rating from all Series within the reading list
    /// 
    public required AgeRating AgeRating { get; set; } = AgeRating.Unknown;
    /// 
    /// Username of the User that owns (in the case of a promoted list)
    /// 
    public string OwnerUserName { get; set; }
    public void ResetColorScape()
    {
        PrimaryColor = string.Empty;
        SecondaryColor = string.Empty;
    }
}