{{-- Left pane: conversations --}} {{-- Right pane: thread --}}
@if($this->selectedContact)

{{ $this->selectedContact->name ?: $this->selectedContact->phone }}

+{{ $this->selectedContact->phone }} @if($this->selectedContact->lead_id) · linked to lead @endif

@forelse($this->thread as $message) @php($inbound = $this->isInbound($message))
$inbound, 'justify-end' => ! $inbound, ])>
$inbound, 'bg-primary-600 text-white' => ! $inbound, ])> @if($message->body)

{{ $message->body }}

@else

({{ $message->message_type?->getLabel() ?? 'message' }})

@endif
$inbound, 'text-primary-100' => ! $inbound, ])> {{ $message->created_at->format('g:i A') }} @if(! $inbound) · {{ $message->status?->getLabel() }} @endif
@empty
No messages yet. Say hello.
@endforelse
@else
Select a conversation or start a new one.
@endif