'use client' import { formatMessageTime, getContactInitials, type Conversation, type Contact, } from '@/lib/MessagesContext' interface ConversationListProps { isDark: boolean filteredConversations: Conversation[] currentConversationId: string | null unreadCount: number searchQuery: string setSearchQuery: (q: string) => void setShowNewConversation: (show: boolean) => void selectConversation: (conv: Conversation) => void getConversationContact: (conv: Conversation) => Contact | undefined } export function ConversationList({ isDark, filteredConversations, currentConversationId, unreadCount, searchQuery, setSearchQuery, setShowNewConversation, selectConversation, getConversationContact, }: ConversationListProps) { return (
{/* Header */}

Nachrichten

{unreadCount > 0 && ( {unreadCount} ungelesen )}
{/* Search */}
setSearchQuery(e.target.value)} placeholder="Suchen..." className={`w-full px-4 py-3 pl-10 rounded-2xl border transition-all ${ isDark ? 'bg-white/5 border-white/10 text-white placeholder:text-white/40 focus:border-green-500/50' : 'bg-white border-slate-200 text-slate-900 placeholder:text-slate-400 focus:border-green-500' } focus:outline-none focus:ring-2 focus:ring-green-500/20`} />
{/* Conversation List */}
{filteredConversations.length === 0 ? (
💬

Keine Konversationen

Starten Sie eine neue Unterhaltung!

) : (
{filteredConversations.map((conv) => ( selectConversation(conv)} /> ))}
)}
) } function ConversationItem({ conv, isDark, isActive, contact, onClick }: { conv: Conversation; isDark: boolean; isActive: boolean contact: Contact | undefined; onClick: () => void }) { return ( ) }