package com.fabledsword.minstrel.models.wire

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
 * Wire shape of `GET /api/home/index` — five flat slices of entity-ID
 * strings, one per Home section. Mirrors
 * `flutter_client/lib/models/home_index.dart` (and the server's
 * `internal/api/types.go HomeIndexPayload`).
 *
 * Section name implies entity type; no per-entry type tag is needed:
 *   - recentlyAddedAlbums  → album
 *   - rediscoverAlbums     → album
 *   - rediscoverArtists    → artist
 *   - mostPlayedTracks     → track
 *   - lastPlayedArtists    → artist
 *   - youMightLikeAlbums   → album
 *   - youMightLikeArtists  → artist
 *
 * All slices default to empty so missing keys don't throw on decode —
 * which also keeps the client safe against older servers that don't
 * emit the you-might-like sections yet.
 */
@Serializable
data class HomeIndexWire(
    @SerialName("recently_added_albums") val recentlyAddedAlbums: List<String> = emptyList(),
    @SerialName("rediscover_albums") val rediscoverAlbums: List<String> = emptyList(),
    @SerialName("rediscover_artists") val rediscoverArtists: List<String> = emptyList(),
    @SerialName("most_played_tracks") val mostPlayedTracks: List<String> = emptyList(),
    @SerialName("last_played_artists") val lastPlayedArtists: List<String> = emptyList(),
    @SerialName("you_might_like_albums") val youMightLikeAlbums: List<String> = emptyList(),
    @SerialName("you_might_like_artists") val youMightLikeArtists: List<String> = emptyList(),
)
