using MessagePack;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace SVSim.EmulatedEntrypoint.Models.Dtos.GuildChat;

/// <summary>
/// Response for POST /guild_chat/deck_log.
/// deck_log keys are stringified API-side Format ints (e.g. "1", "2").
/// TODO(task-17): replace deck_log with typed DTOs when DeckLogData shape is fully specified.
/// Crossover/MyRotation keys must be OMITTED (not empty arrays) when those formats are disabled.
/// </summary>
[MessagePackObject]
public class GuildChatDeckLogResponse
{
    [JsonPropertyName("maintenance_card_list"), Key("maintenance_card_list"),
     JsonIgnore(Condition = JsonIgnoreCondition.Never)]
    public List<int> MaintenanceCardList { get; set; } = new();

    /// <summary>
    /// Decks shared in chat, bucketed by API-side Format value (stringified int keys).
    /// JsonElement pass-through for now — Task 17 will type the inner DeckLogEntry shape.
    /// </summary>
    [JsonPropertyName("deck_log"), Key("deck_log")]
    public JsonElement? DeckLog { get; set; }
}
