{{-- Conversations page — two-panel chat UI. Uses fully-inline CSS because custom Filament pages don't trigger Tailwind JIT on shared-hosting builds (no asset pipeline). Icons are forced to 16px via SVG width/height attributes so they can't render at their native (huge) size when utility classes are absent. --}}
{{-- ── Left panel: leads with messages ─────────────────────── --}} {{-- ── Right panel: thread + composer ─────────────────────── --}}
@if($this->selectedLead)
{{ $this->selectedLead->full_name ?: ($this->selectedLead->email ?: __('filament/conversations.lead_prefix') . $this->selectedLead->id) }} {{ __('filament/conversations.open_lead') }}
@forelse($this->thread as $msg) @php // Translator-first message-status label. The keys // `filament/leads.message_status_*` already exist for the // admin LeadResource message table — reuse them so this // conversation thread bubble respects tenant locale too. $msgStatusKey = 'filament/leads.message_status_' . (string) $msg->status; $msgStatusTrans = $msg->status ? __($msgStatusKey) : ''; $msgStatusLabel = ($msgStatusTrans !== '' && $msgStatusTrans !== $msgStatusKey) ? (string) $msgStatusTrans : ucfirst((string) $msg->status); @endphp
{{ $msg->body ?: ($msg->media_url ? __('filament/conversations.media_label') : '—') }}
{{ strtoupper($msg->channel) }} · {{ $msg->created_at?->diffForHumans() }} @if($msg->direction === 'outbound' && $msg->status) · {{ $msgStatusLabel }}@endif
@empty

{{ __('filament/conversations.empty_thread') }}

@endforelse
{{-- Composer --}}
@if(count($this->availableChannels) > 1) @elseif(count($this->availableChannels) === 1) {{ __('filament/conversations.compose_via', ['channel' => array_values($this->availableChannels)[0]]) }} @endif
@if(count($this->availableChannels) === 0)

{{ __('filament/conversations.warning_no_channel') }} {{ __('filament/conversations.warning_no_channel_link') }} {{ __('filament/conversations.warning_no_channel_suffix') }}

@endif
@else

{{ __('filament/conversations.empty_select_msg') }}

{{ __('filament/conversations.empty_select_sub') }}

@endif