@php $lastDate = null; @endphp
@foreach($messages as $msg)
@php $msgDate = $msg->sent_at?->format('Y-m-d'); @endphp
@if($msgDate !== $lastDate)
{{ $msg->sent_at?->locale('id')->isoFormat('D MMMM YYYY') }}
@php $lastDate = $msgDate; @endphp
@endif
@if($msg->direction === 'outbound' && $msg->is_bot)
๐ค Bot
@elseif($msg->direction === 'outbound' && $msg->user)
{{ $msg->user->name }}
@endif
{{ $msg->content }}
{{ $msg->sent_at?->format('H:i') }}
@if($msg->direction === 'outbound')
@if($msg->status === 'delivered') โโ
@elseif($msg->status === 'read') โโ
@elseif($msg->status === 'failed') โ
@else โ @endif
@endif
@endforeach
@if($messages->isEmpty())
Belum ada pesan dalam percakapan ini
@endif
{{-- Input Area --}}
@if($conversation->status !== 'resolved')