@extends('layouts.app')
@section('title', 'Chat — ' . ($conversation->subject ?? 'Support'))
@push('styles')
@endpush
@section('content')
All Chats
{{ ucfirst($conversation->status) }}
@if(in_array($conversation->status, ['resolved','closed']))
This conversation has been {{ $conversation->status }}. Start a new chat if you need more help.
@endif
@forelse($messages as $msg)
@php $isMine = $msg->sender_id === auth()->id(); @endphp
@if($msg->sender->avatar)
 }})
@else
{{ strtoupper(substr($msg->sender->name,0,2)) }}
@endif
@if(!$isMine)
{{ $msg->sender->name }}
@endif
{{ $msg->message }}
{{ $msg->created_at->format('H:i') }}
@empty
Send a message to start the conversation.
@endforelse
@if(!in_array($conversation->status, ['resolved','closed']))
@endif
@push('scripts')
@endpush
@endsection