import { useIntl } from "react-intl" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./priceList.module.css" import { PriceListProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption" export default function PriceList({ publicPrice = {}, memberPrice = {}, }: PriceListProps) { const intl = useIntl() const { localPrice: publicLocalPrice, requestedPrice: publicRequestedPrice } = publicPrice const { localPrice: memberLocalPrice, requestedPrice: memberRequestedPrice } = memberPrice const showRequestedPrice = publicRequestedPrice && memberRequestedPrice return (
{intl.formatMessage({ id: "Standard price" })}
{publicLocalPrice ? (
{publicLocalPrice.pricePerNight} {publicLocalPrice.currency}
) : ( {intl.formatMessage({ id: "n/a" })} )}
{intl.formatMessage({ id: "Member price" })}
{memberLocalPrice ? (
{memberLocalPrice.pricePerNight} {memberLocalPrice.currency}
) : ( - {intl.formatMessage({ id: "Currency Code" })} )}
{intl.formatMessage({ id: "Approx." })}
{showRequestedPrice ? ( {publicRequestedPrice.pricePerNight}/ {memberRequestedPrice.pricePerNight}{" "} {publicRequestedPrice.currency} ) : ( - / - EUR )}
) }