import { cx } from "class-variance-authority"
import { type ReactNode, Suspense } from "react"
import DiamondAddIcon from "@scandic-hotels/design-system/Icons/DiamondAddIcon"
import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
import { Typography } from "@scandic-hotels/design-system/Typography"
import {
getEurobonusMembership,
isBoostedBySas,
} from "@scandic-hotels/trpc/routers/user/helpers"
import {
SAS_EUROBONUS_TIER_TO_NAME_MAP,
TIER_TO_FRIEND_MAP,
} from "@/constants/membershipLevels"
import { getProfileWithExtendedPartnerData } from "@/lib/trpc/memoizedRequests"
import { Section } from "@/components/Section"
import SectionHeader from "@/components/Section/Header/Deprecated"
import SectionLink from "@/components/Section/Link"
import { getIntl } from "@/i18n"
import { getSasTierExpirationDate } from "@/utils/sas"
import { UnlinkSAS } from "./UnlinkSAS"
import styles from "./linkedAccounts.module.css"
import type { UserLoyalty } from "@scandic-hotels/trpc/types/user"
type Props = {
title?: string
link?: { href: string; text: string }
subtitle?: string
}
export default async function SASLinkedAccount({
title,
subtitle,
link,
}: Props) {
const intl = await getIntl()
return (
}>
{intl.formatMessage({
id: "sas.linkedAccounts.changeDelayInfo",
defaultMessage:
"Changes in your level match can take up to 24 hours to be displayed.",
})}