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 useLang from "@/hooks/useLang"
import { getErrorMessage } from "@/utils/getErrorMessage"
import styles from "./termsAndConditions.module.css"
import {
bookingTerms,
privacy,
} from "@scandic-hotels/common/constants/routes/customerService"
export default function TermsAndConditions() {
const intl = useIntl()
const lang = useLang()
const {
formState: { errors },
register,
} = useFormContext()
const termsAndConditionsMsg = intl.formatMessage(
{
id: "myStay.guarantee.termsAndConditions",
defaultMessage:
"Please accept the general
{termsAndConditionsMsg}