'use client' import { getContactInitials, getRoleLabel, getRoleColor, type Conversation, type Contact, } from '@/lib/MessagesContext' interface ContactInfoPanelProps { contact: Contact | undefined conversation: Conversation onClose: () => void isDark: boolean } export function ContactInfoPanel({ contact, conversation, onClose, isDark }: ContactInfoPanelProps) { return (
{/* Header */}
Info
{/* Content */}
{/* Avatar & Name */}
{conversation.title ? getContactInitials(conversation.title) : '?'}

{conversation.title}

{contact && ( {getRoleLabel(contact.role)} )}
{/* Contact Details */} {contact && (
{contact.email && ( )} {contact.phone && ( )} {contact.student_name && ( )} {contact.tags.length > 0 && (
Tags
{contact.tags.map(tag => ( {tag} ))}
)}
)} {/* Group Members */} {conversation.is_group && (
{conversation.participant_ids.length} Mitglieder
)}
) } function InfoField({ isDark, label, value }: { isDark: boolean; label: string; value: string }) { return (
{label} {value}
) }