import { useNavigate } from 'react-router-dom'; function ChannelBadge({ channel }) { const colors = { WhatsApp: '#2bb741', Email: '#e5a22a', SMS: '#00a4b7', }; return ( {channel} ); } export function MessagesWorkspace({ conversations, activeConversationId, onSelectConversation, actionItems, isWideDesktop = false, isDesktop = false, isTablet = false, isMobile = false, }) { const navigate = useNavigate(); const activeConversation = conversations.find((conversation) => conversation.id === activeConversationId) || conversations[0]; const gridTemplateColumns = isMobile ? '1fr' : isWideDesktop ? 'minmax(240px, 0.95fr) minmax(360px, 1.8fr) minmax(220px, 0.8fr)' : isDesktop || isTablet ? 'minmax(260px, 320px) minmax(0, 1fr)' : '1fr'; return (
Conversas

Atendimento em tempo real por canal.

{conversations.map((conversation) => { const isActive = conversation.id === activeConversation.id; return ( ); })}
{activeConversation.name} {activeConversation.status === 'online' ? 'Online agora' : 'Offline'}
{activeConversation.messages.map((message) => { const isAgent = message.from === 'agent'; return (
{message.text}
); })}
); }