{{-- Back --}} {{-- Header --}}
{{ $seller->name }}

{{ $seller->name }}

{{ $seller->email }}  ·  {{ $seller->phone ?? 'N/A' }}

{{ $inquiries->count() }} Total {{ Str::plural('Inquiry', $inquiries->count()) }}
{{-- Grouped by Listing --}} @php $grouped = $inquiries->groupBy('car_listing_id'); @endphp @forelse($grouped as $listingId => $listingInquiries) @php $listing = $listingInquiries->first()->listing; @endphp
{{-- Car Header — click pe car view page --}} {{ $listing->title }}

{{ $listing->title ?? 'Listing #' . $listing->id }}

{{ $listing->status ?? 'N/A' }}  ·  {{ $listing->created_at->format('M d, Y') }}

{{ $listingInquiries->count() }} {{ Str::plural('Inquiry', $listingInquiries->count()) }}
{{-- Inquiries --}} @foreach($listingInquiries as $inq)
{{-- Avatar initials --}}
{{ strtoupper(substr($inq->first_name, 0, 1)) }}
{{-- Name & Contact --}}

{{ $inq->first_name }} {{ $inq->last_name }}

{{ $inq->phone }} @if($inq->email)  ·  {{ $inq->email }} @endif

{{-- Message --}}
{{ $inq->message ?? 'Confirm availability' }}
{{-- Time --}}
{{ $inq->created_at->diffForHumans() }}
{{ $inq->created_at->format('M d, Y') }}
{{-- Status Badge --}} @php $statusMap = [ 'pending' => ['pill' => 'pill-pending', 'dot' => 'dot-pending', 'label' => 'Pending'], 'contacted' => ['pill' => 'pill-contacted', 'dot' => 'dot-contacted', 'label' => 'Contacted'], 'not-available' => ['pill' => 'pill-na', 'dot' => 'dot-na', 'label' => 'Not Available'], ]; $s = $statusMap[$inq->status] ?? $statusMap['pending']; @endphp
{{ $s['label'] }}
@endforeach
@empty

No inquiries found for this seller.

@endforelse