import { HotelTypeEnum } from "@/types/enums/hotelType"

export function getBreakfastMessage(
  publicBreakfastIncluded: boolean,
  memberBreakfastIncluded: boolean,
  hotelType: string | undefined,
  userIsLoggedIn: boolean,
  msgs: Record<
    "included" | "noSelection" | "scandicgo" | "notIncluded",
    string
  >,
  roomNr: number
) {
  if (hotelType === HotelTypeEnum.ScandicGo) {
    return msgs.scandicgo
  }

  if (userIsLoggedIn && memberBreakfastIncluded && roomNr === 1) {
    return msgs.included
  }

  if (publicBreakfastIncluded && memberBreakfastIncluded) {
    return msgs.included
  }

  if (!publicBreakfastIncluded && !memberBreakfastIncluded) {
    return msgs.notIncluded
  }

  return msgs.notIncluded
}
