package fr.bglands.client.protocol;

import java.util.Objects;

public record UiControl(
        String id,
        String label,
        String description,
        String icon,
        String token,
        Integer x,
        Integer y,
        Integer width,
        Integer height,
        String color
) {
    public UiControl {
        Objects.requireNonNull(id, "id");
        Objects.requireNonNull(label, "label");
        description = description == null ? "" : description;
        icon = icon == null ? "" : icon;
        Objects.requireNonNull(token, "token");
    }
}
