using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Responses.Deck;
///
/// Shape consumed by DeckGroupListData(jsonData, format). Spec at
/// docs/api-spec/endpoints/post-login/deck-info.md only enumerates maintenance_card_list
/// and user_deck_list explicitly (with [k: string]: unknown for the rest); the 2026-05-23
/// prod capture filled in the gap — default_deck_list, user_leader_skin_setting_list,
/// and trial_deck_list are all present and sourced from globals.
///
[MessagePackObject]
public class DeckListResponse
{
[JsonPropertyName("maintenance_card_list")]
[Key("maintenance_card_list")] public List MaintenanceCardList { get; set; } = new();
///
/// Single-format viewer decks. Emitted when the request specified a specific format
/// (e.g. Rotation, Unlimited) — mutually exclusive with the per-format keys below.
///
[JsonPropertyName("user_deck_list")]
[Key("user_deck_list")] public List? UserDeckList { get; set; }
///
/// Per-format viewer decks. Emitted when the request specified All format (deck_format=0).
/// Prod's DeckListUtility.ParseDeckInfoResponceData All-format branch only walks these
/// per-format keys (not user_deck_list), so the controller swaps shape based on the request.
/// The PreRotation / Crossover / Avatar siblings exist in client code but prod omits them
/// for fresh viewers; we mirror that omission.
///
[JsonPropertyName("user_deck_rotation")]
[Key("user_deck_rotation")] public List? UserDeckRotation { get; set; }
[JsonPropertyName("user_deck_unlimited")]
[Key("user_deck_unlimited")] public List? UserDeckUnlimited { get; set; }
[JsonPropertyName("user_deck_my_rotation")]
[Key("user_deck_my_rotation")] public List? UserDeckMyRotation { get; set; }
///
/// Global starter decks, keyed by deck_no as string (prod ids 91-98 — one per class).
///
[JsonPropertyName("default_deck_list")]
[Key("default_deck_list")] public Dictionary DefaultDeckList { get; set; } = new();
///
/// Default leader skin per class, keyed by class_id as string.
///
[JsonPropertyName("user_leader_skin_setting_list")]
[Key("user_leader_skin_setting_list")] public Dictionary UserLeaderSkinSettingList { get; set; } = new();
///
/// Trial / tutorial-specific decks. Empty in the 2026-05-23 prod capture; entry shape TBD.
///
[JsonPropertyName("trial_deck_list")]
[Key("trial_deck_list")] public List TrialDeckList { get; set; } = new();
}