@extends('layouts.app') @section('content') {{-- UNIFIED REUSABLE PAGE HEADER --}} @include('partials.page-header', [ 'title' => 'Messages', 'subtitle' => 'Conversations open when an interest is accepted between both members.', ])
@forelse ($conversations as $conversation) @php($hasUnread = ($conversation['unread'] ?? 0) > 0)
{{ mb_substr($conversation['name'] ?? 'M', 0, 1) }}

{{ $conversation['name'] }} @include('partials.verified-badge', ['verified' => !empty($conversation['verified']) || !empty($conversation['is_verified'])])

{{ $conversation['preview'] ?: 'No messages yet' }}

{{ $conversation['at'] }} @if ($hasUnread) {{ $conversation['unread'] }} unread @endif
@empty @include('partials.empty-state', [ 'iconSvg' => '', 'title' => 'No conversations yet.', 'description' => 'A conversation opens after an interest is mutually accepted. Blocked people cannot be messaged.', 'actionUrl' => route('discover'), 'actionText' => 'Discover profiles', ]) @endforelse
@endsection