'use client'; import { useTranslations } from 'next-intl'; import { CaseSentLabel } from '@/components/ui/treatment/CaseSentLabel'; import { labNotSentBadgeClass, labSentBadgeClass } from '@/components/ui/treatment/treatmentStatusStyles'; import type { LinkedOrganizationOption, PastTreatmentDetail } from '@/types/treatment'; interface DetailLabSendBadgeProps { detail: Pick< PastTreatmentDetail, 'treatmentType' | 'sentAt' | 'sends' | 'destinationOrganizationId' >; labDependentCodes: Set; orgs?: LinkedOrganizationOption[]; className?: string; } export function DetailLabSendBadge({ detail, labDependentCodes, orgs, className = '', }: DetailLabSendBadgeProps) { const t = useTranslations('treatment'); if (!labDependentCodes.has(detail.treatmentType)) { return null; } if (detail.sentAt) { return ( ); } return ( {t('detailNotSentToLab')} ); }