package dto

// Every reading takes the querent's name — the web flow asks for it before the
// cards are dealt — and a language. Both are optional here rather than required:
// a reading is still a reading without a name, and refusing one over a missing
// display string would be perverse.
//
// Directions arrive as the client saw them. The shuffle endpoint labels a card
// "reversed" while the reading endpoints only accept "reverse", so the service
// normalises rather than making every client remember the difference.

// TarotCardListRequest filters the catalogue. Everything is optional.
type TarotCardListRequest struct {
	// Arcana is "major" or "minor".
	Arcana string `form:"arcana" json:"arcana"`

	// Suit is cups, wands, swords or pentacles.
	Suit string `form:"suit" json:"suit"`

	// Search matches on the card name.
	Search string `form:"search" json:"search"`

	Lang string `form:"lang" json:"lang"`
}

// TarotShuffleRequest asks for a spread to choose from.
type TarotShuffleRequest struct {
	// ShuffleType is "both" (default), "upright" or "reverse" — whether the
	// dealt cards may come out reversed.
	ShuffleType string `form:"shuffle_type" json:"shuffle_type"`

	Lang string `form:"lang" json:"lang"`
}

// TarotCardPick is one chosen card and which way up it was dealt.
type TarotCardPick struct {
	Card string `json:"card"`

	Direction string `json:"direction"`
}

// TarotReadingRequest covers every single-card reading: one card, yes/no,
// career, and the four love spreads.
type TarotReadingRequest struct {
	Name string `json:"name"`

	Card string `json:"card" binding:"required"`

	Direction string `json:"direction"`

	Lang string `json:"lang"`

	// Style selects the love reading: in_depth (default), erotic,
	// made_for_each_other or flirt. Ignored by the other readings.
	Style string `json:"style"`
}

// TarotThreeCardRequest is the past / present / future spread.
type TarotThreeCardRequest struct {
	Name string `json:"name"`

	Lang string `json:"lang"`

	// Cards are read in order: past, present, future.
	Cards []TarotCardPick `json:"cards" binding:"required"`
}

// TarotLoveTriangleRequest reads one card for each person involved.
type TarotLoveTriangleRequest struct {
	Name string `json:"name"`

	Lang string `json:"lang"`

	CardSelf string `json:"card_self" binding:"required"`

	CardLover1 string `json:"card_lover1" binding:"required"`

	CardLover2 string `json:"card_lover2" binding:"required"`
}

// TarotBreakupRequest reads a cause and an advice card.
type TarotBreakupRequest struct {
	Name string `json:"name"`

	Lang string `json:"lang"`

	// Kind is "romantic" (default) or "business".
	Kind string `json:"kind"`

	CardCause string `json:"card_cause" binding:"required"`

	CardAdvise string `json:"card_advise" binding:"required"`
}
