function ChannelBadge({ channel }) { const colors = { WhatsApp: '#2bb741', Email: '#e5a22a', SMS: '#00a4b7', }; return ( {channel} ); } function AssignmentDot({ contact, currentUserId }) { const assignment = contact.assignment; const assignedUserId = assignment?.user_id ? Number(assignment.user_id) : null; const isQueued = assignment?.status === 'queued' && !assignedUserId; const isMine = assignedUserId && currentUserId && assignedUserId === Number(currentUserId); const meta = isQueued ? { color: '#e5a22a', label: 'Chamado na fila da especialidade, ainda sem atribuição', } : isMine ? { color: '#00a4b7', label: 'Chamado atribuído a mim', } : assignedUserId ? { color: '#d62828', label: `Chamado atribuído a ${assignment?.user_nome || 'outra pessoa'}`, } : null; if (!meta) return null; return ( ); } function SpecialtyBadge({ contact }) { const specialty = contact.assignment?.area_nome || contact.area; if (!specialty || specialty === 'Sem fila') return null; return ( {specialty} ); } function UnreadBadge({ count }) { if (!count) return null; return ( {count > 99 ? '99+' : count} ); } function SavedContactLabel({ contact }) { const profile = contact.contactProfile; const hasSavedContact = Boolean(profile?.created_at || profile?.name || profile?.company || profile?.note); if (!hasSavedContact) return null; return ( •Salvo• ); } const CHAT_LIST_HEIGHT = 'min(760px, calc(100vh - 160px))'; export function ChatConversationList({ contacts, activeContactId, onSelectContact, onOpenContact, currentUserId, isMobile = false, }) { return ( ); }