import { useRef } from 'react' import { Link, useNavigate } from '@tanstack/react-router' import { ArrowLeft, Loader2 } from 'lucide-react' import { LargeTitle } from '../../components/layout/LargeTitle' import { Avatar, Badge, Button } from '../../components/ui' import { AbsenceLinkSection } from './AbsenceLinkSection' import { AttendeeActionsMenu } from './AttendeeActionsMenu' import { AttendeeAttendanceSection } from './AttendeeAttendanceSection' import { AttendeeContactActions } from './AttendeeContactActions' import { AttendeeContactSection } from './AttendeeContactSection' import { AttendeeNotesSection } from './AttendeeNotesSection' import { AttendeePaymentsSection } from './AttendeePaymentsSection' import { OtherGroupsSection } from './OtherGroupsSection' import { useAttendeeDetail } from './AttendeeDetailProvider' import { ChangeGroupDialog } from './ChangeGroupDialog' import { ConfirmRemoveAttendeeDialog } from './ConfirmRemoveAttendeeDialog' import { formatMemberSince } from './attendance' import { paymentPresentation } from './detail' import { StudentAccessSection } from './StudentAccessSection' import { useTranslation } from 'react-i18next' export function AttendeeDetailView() { const { groupId, groupName, attendee, attendeePending, attendeeFailed } = useAttendeeDetail() const navigate = useNavigate() const { t } = useTranslation(['attendeeDetail', 'common', 'groupDetail']) const menuTriggerRef = useRef(null) const payment = attendee ? paymentPresentation(attendee.payment) : null return (
{attendeePending ? (
) : null} {attendeeFailed || (!attendeePending && !attendee) ? (

{t('notFound.title')}

{t('notFound.description')}

) : null} {attendee ? ( <>
) : null}
) }