import { Dialog, Modal, ModalOverlay } from "react-aria-components" import { useIntl } from "react-intl" import { InfoCircleIcon } from "@/components/Icons" import Button from "@/components/TempDesignSystem/Button" import Body from "@/components/TempDesignSystem/Text/Body" import Title from "@/components/TempDesignSystem/Text/Title" import { formatPrice } from "@/utils/numberFormatting" import styles from "./priceChangeDialog.module.css" import type { PriceChangeDialogProps } from "@/types/components/hotelReservation/enterDetails/priceChangeDialog" export default function PriceChangeDialog({ isOpen, oldPrice, newPrice, currency, onCancel, onAccept, }: PriceChangeDialogProps) { const intl = useIntl() const title = intl.formatMessage({ id: "The price has increased" }) return (
{title}
{intl.formatMessage({ id: "The price has increased since you selected your room.", })}
{intl.formatMessage({ id: "You can still book the room but you need to confirm that you accept the new price", })}
{formatPrice(intl, oldPrice, currency)} {formatPrice(intl, newPrice, currency)}
) }