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
{descriptionText}