using System.Text.Json.Serialization;

namespace Kynareth.Models;

public class ImageGenerationImage : ImageEndpoint
{
    [JsonPropertyName("rotate"), ConfigurationKeyName("rotate")] 
    public int Rotate { get; set; } = 0;
    
    [JsonPropertyName("under"), ConfigurationKeyName("under")] 
    public bool PlaceUnder { get; set; } = false;

    [JsonPropertyName("position"), ConfigurationKeyName("position")] 
    public ICollection<GenerationPositionRect> Positions { get; set; }
}

public class ImageGenerationEndpointRead
{
    [JsonPropertyName("name"), ConfigurationKeyName("name")] 
    public string Name { get; set; }
        
    [JsonPropertyName("sources"), ConfigurationKeyName("sources")] 
    public int SourcesRequired { get; set; }
}

public class ImageGenerationEndpoint : ImageGenerationImage
{
    [JsonPropertyName("folder"), ConfigurationKeyName("folder")] 
    public string Folder { get; set; }

    [JsonPropertyName("sources"), ConfigurationKeyName("sources")] 
    public int SourcesRequired { get; set; } = 0;

    [JsonPropertyName("variants"), ConfigurationKeyName("variants")] 
    public ICollection<ImageGenerationImage> Variants { get; set; }
}