import ButtonLink from "@scandic-hotels/design-system/ButtonLink" import { Typography } from "@scandic-hotels/design-system/Typography" import { getEurobonusMembership } from "@scandic-hotels/trpc/routers/user/helpers" import { getProfileWithExtendedPartnerData } from "@/lib/trpc/memoizedRequests" import Image from "@/components/Image" import { getIntl } from "@/i18n" import desktopBackground from "@/public/_static/img/sas/sas-scandic-link-account-banner-desktop.png" import mobileBackground from "@/public/_static/img/sas/sas-scandic-link-account-banner-mobile.png" import styles from "./linkAccountBanner.module.css" import type { DynamicContentProps } from "@/types/components/blocks/dynamicContent" export default async function SASLinkAccountBanner( props: DynamicContentProps["dynamic_content"] ) { const intl = await getIntl() const user = await getProfileWithExtendedPartnerData() if (!user || "error" in user || !user.loyalty) { return null } const sasMembership = getEurobonusMembership(user.loyalty) if (sasMembership) { return null } function match() { return ( {intl.formatMessage({ defaultMessage: "MATCH", })} ) } const headingText = intl.formatMessage( { defaultMessage: "A MADE IN HEAVEN", }, { match, } ) const buttonText = props.link?.text || intl.formatMessage({ defaultMessage: "Read more and link accounts", }) function scandicFriends() { return ( {intl.formatMessage({ defaultMessage: "Scandic Friends", })} ) } function sasEuroBonus() { return ( {intl.formatMessage({ defaultMessage: "SAS EuroBonus", })} ) } const descriptionText = intl.formatMessage( { defaultMessage: "Link your and accounts to earn, use and exchange points between memberships", }, { scandicFriends, sasEuroBonus, } ) return (
SAS Scandic Link Account Banner Mobile Background SAS Scandic Link Account Banner Desktop Background

{headingText}

{descriptionText}

{props.link?.href ? (
{buttonText}
) : null}
) }