import React, { useMemo } from 'react'; import { Loader2, AlertCircle } from 'lucide-react'; import { cn } from '@/lib/utils'; import { STATUS_META, isPaidStatus } from '@/lib/trackerUtils'; import type { TrackerStatus } from '@/types'; interface StatusBadgeProps { status: TrackerStatus; clickable?: boolean; onClick?: () => void; loading?: boolean; } export const StatusBadge = React.memo(function StatusBadge({ status, clickable, onClick, loading }: StatusBadgeProps) { const meta = useMemo(() => STATUS_META[status] || STATUS_META.upcoming, [status]); const isSkipped = status === 'skipped'; const isUrgent = status === 'late' || status === 'missed'; const canClick = clickable && !isSkipped && !loading; return ( ); });