namespace ArtificersScrollwork.Sidecar.Models;

/// <summary>Discriminated union of all Gump draw call types.</summary>
public abstract record DrawCall(string Type);

public record BackgroundDrawCall(int X, int Y, int W, int H, int GumpId)
    : DrawCall("background");

public record ImageDrawCall(int X, int Y, int GumpId, int? Hue = null)
    : DrawCall("image");

public record LabelDrawCall(int X, int Y, int Hue, string Text)
    : DrawCall("label");

public record ButtonDrawCall(int X, int Y, int NormalId, int PressedId, int ButtonId)
    : DrawCall("button");

public record HtmlDrawCall(int X, int Y, int W, int H, string Text, bool HasBackground, bool HasScrollbar)
    : DrawCall("html");

public record ItemDrawCall(int X, int Y, int ItemId, int? Hue = null)
    : DrawCall("item");

public record AlphaRegionDrawCall(int X, int Y, int W, int H)
    : DrawCall("alpha_region");

public record TiledImageDrawCall(int X, int Y, int W, int H, int GumpId)
    : DrawCall("tiled_image");

public record CheckboxDrawCall(int X, int Y, int InactiveId, int ActiveId, bool Checked, int SwitchId)
    : DrawCall("checkbox");

public record RadioDrawCall(int X, int Y, int InactiveId, int ActiveId, bool Checked, int ReturnValue)
    : DrawCall("radio");

public record TextEntryDrawCall(int X, int Y, int W, int H, int Hue, int EntryId, string InitialText)
    : DrawCall("text_entry");
