import { Link } from 'react-router-dom'; import { BrandMark } from '../../../shared/components/BrandMark'; import { useViewport } from '../../../shared/hooks/useViewport'; import { ChatConversationList } from '../components/ChatConversationList'; import { ChatTransferPanel } from '../components/ChatTransferPanel'; import { ChatWindow } from '../components/ChatWindow'; import { useChat } from '../hooks/useChat'; import { quickReplies } from '../services/chatMocks'; export function ChatPage() { const { isWideDesktop, isDesktop, isTablet, isMobile } = useViewport(); const { contacts, activeContact, activeContactId, setActiveContactId, messages, draft, setDraft, attachedFile, attachFile, removeAttachedFile, sendMessage, hydrateMessageMedia, isReplying, selectedArea, setSelectedArea, isTransferOpen, setIsTransferOpen, transferArea, setTransferArea, transferAreas, attendants, transferAttendant, setTransferAttendant, transferNote, setTransferNote, submitTransfer, } = useChat(); const gridTemplateColumns = isMobile ? '1fr' : isWideDesktop ? 'minmax(260px, 320px) minmax(0, 1.6fr) minmax(280px, 320px)' : isDesktop || isTablet ? 'minmax(260px, 320px) minmax(0, 1fr)' : '1fr'; return (
Atendimento em tempo real
Voltar para home
setIsTransferOpen((current) => !current)} isReplying={isReplying} isMobile={isMobile} />
{quickReplies.map((reply) => ( ))}
{isWideDesktop ? ( setIsTransferOpen(false)} /> ) : null}
{!isWideDesktop ? ( setIsTransferOpen(false)} /> ) : null}
); }