package dto

// The 78-card deck is described locally rather than fetched: VedicAstroAPI has
// no "list the cards" endpoint, its reading endpoints are metered, and the card
// artwork is served from a public bucket whose URLs are derivable from the card
// id. So the catalogue pages — the deck, major arcana, minor arcana, a single
// card — cost nothing upstream and cannot fail.

// TarotCardImages holds the artwork for one card, keyed by style: classic,
// artwork, dark and ghibli. Reversed cards have their own images rather than
// being rotated by the client.
type TarotCardImages struct {
	Upright map[string]string `json:"upright"`

	Reversed map[string]string `json:"reversed"`

	// Back is the same face-down artwork for every card, included so a client
	// laying out a spread does not have to hard-code the URL.
	Back map[string]string `json:"back"`
}

// TarotCard is one card's identity. Arcana is "major" or "minor"; Suit and
// Court apply to the minor arcana only, Roman to the major.
type TarotCard struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Arcana string `json:"arcana"`

	// Suit is cups, wands, swords or pentacles. Empty for the major arcana.
	Suit string `json:"suit,omitempty"`

	// Number is 0-21 through the major arcana, and 1-14 within a minor suit
	// (11-14 being page, knight, queen, king).
	Number int `json:"number"`

	// Roman is the traditional numeral shown on a major arcana card.
	Roman string `json:"roman,omitempty"`

	// Court marks the four court cards of a suit.
	Court bool `json:"court,omitempty"`

	Images TarotCardImages `json:"images"`
}

// TarotCardListResponse is the deck, or the part of it that was asked for.
type TarotCardListResponse struct {
	Total int `json:"total"`

	Major int `json:"major"`

	Minor int `json:"minor"`

	Cards []TarotCard `json:"cards"`
}
