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 caller = await serverClient()
  const tierComparison =
    await caller.contentstack.partner.getSasTierComparison()

  if (!tierComparison) return null

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