@if($selectedConversation) @php $activeListing = $selectedConversation->listing; $activePartner = (int) $selectedConversation->buyer_id === (int) auth()->id() ? $selectedConversation->seller : $selectedConversation->buyer; $activePriceLabel = $activeListing && !is_null($activeListing->price) ? number_format((float) $activeListing->price, 0).' '.($activeListing->currency ?? 'TL') : null; @endphp
{{ strtoupper(substr((string) ($activePartner?->name ?? 'K'), 0, 1)) }}

{{ $activePartner?->name ?? 'User' }}

{{ $activeListing?->title ?? 'Listing removed' }}

@if($activePriceLabel)
{{ $activePriceLabel }}
@endif
@forelse($selectedConversation->messages as $message) @php $isMine = (int) $message->sender_id === (int) auth()->id(); @endphp
{{ $message->body }}

{{ $message->created_at?->format('H:i') }}

@empty

No messages yet.

Use a quick reply or send the first message below.

@endforelse
@foreach($quickMessages as $quickMessage)
@csrf
@endforeach
@csrf
@else

Choose a conversation to start messaging.

Start a new chat from a listing detail page or continue an existing thread here.

@endif