import type { CurrencyEnum } from "@/types/enums/currency"
import type { Packages } from "@/types/requests/packages"
import type { RoomState } from "@/types/stores/enter-details"
import type {
  DetailsBooking,
  RoomPrice,
  RoomRate,
} from "./enterDetails/details"
import type { Price } from "./price"
import type { Child, SelectRateBooking } from "./selectRate/selectRate"

export type RoomsData = {
  rateDetails: string[] | undefined
  roomType: string
  cancellationText: string
  roomPrice: RoomPrice
  adults: number
  children?: Child[]
  packages: Packages | null
}

export interface SummaryProps {
  isMember: boolean
}

export interface EnterDetailsSummaryProps {
  booking: DetailsBooking
  isMember: boolean
  totalPrice: Price
  vat: number
  rooms: RoomState[]
  toggleSummaryOpen: () => void
  defaultCurrency: CurrencyEnum
}

export interface SelectRateSummaryProps {
  booking: SelectRateBooking
  isMember: boolean
  totalPrice: Price
  vat: number
  rooms: Array<{
    adults: number
    childrenInRoom: Child[] | undefined
    roomType: string
    roomPrice: RoomPrice
    roomRate: RoomRate
    rateDetails: string[] | undefined
    cancellationText: string
    packages?: Packages
  } | null>
  toggleSummaryOpen: () => void
}
