import { serverClient } from "@/lib/trpc/server"

import { SasTierComparison } from "@/components/SasTierComparison"

type SASTierComparisonBlockProps = {
  title: string
  preamble: string
}
export default async function SASTierComparisonBlock({
  title,
  preamble,
}: SASTierComparisonBlockProps) {
  const tierComparison =
    await serverClient().contentstack.partner.getSasTierComparison()

  if (!tierComparison) return null

  return (
    <SasTierComparison
      title={title}
      preamble={preamble}
      tierComparison={tierComparison}
    />
  )
}
