"use client" import { useState } from "react" import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" import { Button } from "@scandic-hotels/design-system/Button" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { Typography } from "@scandic-hotels/design-system/Typography" import { PaymentMethodEnum } from "@/constants/booking" import Modal from "@/components/Modal" import Divider from "@/components/TempDesignSystem/Divider" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" import MySavedCards from "../Payment/MySavedCards" import PaymentOption from "../Payment/PaymentOption" import TermsAndConditions from "../Payment/TermsAndConditions" import styles from "./confirm.module.css" import type { CreditCard } from "@/types/user" interface ConfirmBookingProps { savedCreditCards: CreditCard[] | null } export default function ConfirmBooking({ savedCreditCards, }: ConfirmBookingProps) { const intl = useIntl() const [isModalOpen, setModalOpen] = useState(false) const { watch } = useFormContext() const guarantee = watch("guarantee") return (
{intl.formatMessage({ id: "Guarantee room for late arrival", })}
{intl.formatMessage({ id: "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.", })}
{intl.formatMessage({ id: "In case of a no-show, your credit card will be charged for the first night.", })}
{intl.formatMessage({ id: "I may arrive later than 18:00 and want to guarantee my booking with a credit card.", })}
{intl.formatMessage({ id: "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.", })}