import type { IntlShape } from "react-intl"

import { Periods } from "@/types/components/hotelPage/sidepeek/parking"

export function getPeriod(intl: IntlShape, period?: string) {
  switch (period) {
    case Periods.hour:
      return intl.formatMessage({
        defaultMessage: "Price per hour",
      })
    case Periods.day:
      return intl.formatMessage({
        defaultMessage: "Price per day",
      })
    case Periods.night:
      return intl.formatMessage({
        defaultMessage: "Price per night",
      })
    case Periods.allDay:
      return intl.formatMessage({
        defaultMessage: "Price per 24 hours",
      })
    default:
      return period
  }
}
