"use client" import { useIntl } from "react-intl" import { privacyPolicy } from "@/constants/currentWebHrefs" import { CheckIcon } from "@/components/Icons" import LoginButton from "@/components/LoginButton" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" import Link from "@/components/TempDesignSystem/Link" import Caption from "@/components/TempDesignSystem/Text/Caption" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import useLang from "@/hooks/useLang" import styles from "./joinScandicFriendsCard.module.css" import { JoinScandicFriendsCardProps } from "@/types/components/hotelReservation/enterDetails/details" export default function JoinScandicFriendsCard({ name, memberPrice, }: JoinScandicFriendsCardProps) { const lang = useLang() const intl = useIntl() const list = [ { title: intl.formatMessage({ id: "Earn bonus nights & points" }) }, { title: intl.formatMessage({ id: "Get member benefits & offers" }) }, { title: intl.formatMessage({ id: "Join at no cost" }) }, ] const saveOnJoiningLabel = intl.formatMessage( { id: "Only pay {amount} {currency}", }, { amount: intl.formatNumber(memberPrice?.price ?? 0), currency: memberPrice?.currency ?? "SEK", } ) return (
{memberPrice ? ( {saveOnJoiningLabel} ) : null} {intl.formatMessage({ id: "Join Scandic Friends" })}
{intl.formatMessage({ id: "Already a friend?" })}{" "} {intl.formatMessage({ id: "Log in" })}
{list.map((item) => ( {item.title} ))}
{intl.formatMessage( { id: "signup.terms", }, { termsLink: (str) => ( {str} ), } )}
) }