import React from 'react'; import { Head, Link } from '@inertiajs/react'; import EmployerLayout from '../../../Layouts/EmployerLayout'; import { MessageSquare, CheckCircle2, ChevronRight, Search, Plus } from 'lucide-react'; import { useTranslation } from '../../../lib/LanguageContext'; export default function Index({ conversations }) { const { t } = useTranslation(); return (
{/* Header Actions */}
{t('new_conversation', 'New Conversation')}

{t('active_threads', 'Active Threads')}

{t('total_count', '{count} Total').replace('{count}', conversations?.length || 0)}
{conversations?.length > 0 ? (
{conversations.map((thread) => (
{thread.worker_name.charAt(0)}
{thread.online && ( )}
{thread.worker_name}
{thread.sent_at}

{thread.last_message}

{thread.unread ? ( ) : ( )}
))}
) : (
{t('no_active_messages', 'No active messages')}

{t('no_active_messages_desc', 'When you message workers or schedule interviews, your conversation threads will appear here.')}

{t('find_workers', 'Find Workers')}
)}
); }