import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" import Checkbox from "@scandic-hotels/design-system/Form/Checkbox" import { ErrorMessage } from "@scandic-hotels/design-system/Form/ErrorMessage" import { TextLink } from "@scandic-hotels/design-system/TextLink" import { Typography } from "@scandic-hotels/design-system/Typography" import { useBookingFlowConfig } from "../../../../bookingFlowConfig/bookingFlowConfigContext" import useLang from "../../../../hooks/useLang" import styles from "./termsAndConditions.module.css" type TermsAndConditionsProps = { isFlexBookingTerms: boolean } export default function TermsAndConditions({ isFlexBookingTerms, }: TermsAndConditionsProps) { const intl = useIntl() const lang = useLang() const { routes } = useBookingFlowConfig() const { formState: { errors }, } = useFormContext() return (
{intl.formatMessage({ id: "booking.acceptBookingTerms", defaultMessage: "I accept the booking and cancellation terms", })}

{isFlexBookingTerms ? intl.formatMessage( { id: "enterDetails.paymentStep.flexBookingTermsAndConditions", defaultMessage: "To complete your booking, please accept the general Booking & Cancellation Terms, and acknowledge that your data will be processed in accordance with Scandic's Privacy policy.", }, { termsAndConditionsLink: (str) => ( {str} ), privacyPolicyLink: (str) => ( {str} ), } ) : intl.formatMessage( { id: "enterDetails.payment.termsAndConditions", defaultMessage: "By paying with any of the payment methods available, I accept the terms for this booking and the general Booking & Cancellation Terms, and understand that Scandic will process my personal data for this booking in accordance with Scandic's Privacy policy. I also accept that Scandic requires a valid payment card during my visit in case anything is left unpaid.", }, { termsAndConditionsLink: (str) => ( {str} ), privacyPolicyLink: (str) => ( {str} ), } )}

) }