"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 { Typography } from "@scandic-hotels/design-system/Typography" import { PaymentMethodEnum } from "@/constants/booking" import { bookingTermsAndConditions, privacyPolicy, } from "@/constants/currentWebHrefs" import { InfoCircleIcon } from "@/components/Icons" import Modal from "@/components/Modal" import Divider from "@/components/TempDesignSystem/Divider" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" import Link from "@/components/TempDesignSystem/Link" import useLang from "@/hooks/useLang" import MySavedCards from "../Payment/MySavedCards" import PaymentOption from "../Payment/PaymentOption" 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 lang = useLang() 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: "I would like to get my booking confirmation via sms", })}
{intl.formatMessage(
{
id: "By paying with any of the payment methods available, I accept the terms for this booking and the general