'use client'; import * as React from 'react'; import { m, LazyMotion, domAnimation } from 'framer-motion'; import Image from 'next/image'; import { useTranslations } from 'next-intl'; export interface TeamMember { id: string; name: string; position: string; email?: string | null; phone?: string | null; image?: { url: string; alt?: string; } | string | null; branch?: string; } interface TeamGridProps { members: TeamMember[]; } export function TeamGrid({ members }: TeamGridProps) { const t = useTranslations('TeamGrid'); if (!members || members.length === 0) return null; return (

{t('badge')}

{t('title')}

{t('subtitle')}

{members.map((member, i) => ( {/* Card Banner */}
{/* Overlapping Profile Picture */}
{member.image && (typeof member.image === 'string' ? member.image : member.image.url) ? ( {member.name} ) : (
)}
{/* Details */}

{member.name}

{member.position}

{member.branch && (
{member.branch === 'e-tib' ? t('branchETIB') : member.branch === 'ing' ? t('branchIng') : member.branch === 'bohrtechnik' ? t('branchBohr') : member.branch}
)} {/* Contacts (Sticky at bottom) */}
{member.email && (
{member.email}
)} {member.phone && (
{member.phone}
)}
))}
); }