import { env } from "@/env/server"

import DigitalTeamMemberCardClient from "./Client"

import type { User } from "@/types/user"

interface DigitalTeamMemberCardProps {
  user: User
}

export default async function DigitalTeamMemberCard({
  user,
}: DigitalTeamMemberCardProps) {
  if (!env.ENABLE_DTMC) {
    return null
  }

  // TODO: Make a check whether user is eligible for benefits or not

  return <DigitalTeamMemberCardClient user={user} />
}
