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

import DigitalTeamMemberCardClient from "./Client"

import type { User } from "@scandic-hotels/trpc/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} />
}
