import { Box, Typography } from '@mui/material' import { Bot, Building2, FileText } from 'lucide-react' import { DS_COLORS } from '../../lib/ds' import type { InquiryMessage } from '../../domain/inquiry' export function AnfragenMessageBubble({ msg }: { msg: InquiryMessage }) { const isOwnMessage = msg.senderType === 'tenant' const isAI = msg.senderType === 'ai' const time = new Date(msg.createdAt).toLocaleTimeString('de-CH', { hour: '2-digit', minute: '2-digit' }) const date = new Date(msg.createdAt).toLocaleDateString('de-CH', { day: '2-digit', month: '2-digit' }) return ( {!isOwnMessage && isAI && } {!isOwnMessage && msg.senderType === 'supply_user' && } {msg.senderName} ยท {date} {time} {msg.body} {msg.attachments.length > 0 && ( {msg.attachments.map(att => ( {att.fileName} {att.fileSize && ( {att.fileSize < 1024 * 1024 ? `${Math.round(att.fileSize / 1024)} KB` : `${(att.fileSize / 1024 / 1024).toFixed(1)} MB`} )} ))} )} ) }