{{-- ── Left Filter Sidebar ─────────────────────────────────────────────── --}}
{{-- Search --}}
{{-- Total count --}}
All Messages ({{ $counts['all'] ?? 0 }})
{{-- Platform filters --}}

Platform

@php $platforms = ['instagram' => 'Instagram', 'facebook' => 'Facebook', 'twitter' => 'Twitter', 'youtube' => 'YouTube', 'linkedin' => 'LinkedIn']; @endphp @foreach($platforms as $value => $label) @if(isset($counts[$value])) @endif @endforeach
{{-- Type filters --}}

Type

@php $types = ['' => 'All Types', 'comment' => 'Comments', 'dm' => 'DMs', 'mention' => 'Mentions']; @endphp @foreach($types as $value => $label) @endforeach
{{-- Toggle filters --}}
{{-- ── Message List ─────────────────────────────────────────────────────── --}}
{{-- Flash message --}} @if($flashMessage)
{{ $flashMessage }}
@endif @if($messages->isEmpty())

No messages found

Try adjusting your filters

@else @foreach($messages as $msg) @php $sentimentColors = ['positive' => 'bg-green-100 text-green-700', 'negative' => 'bg-red-100 text-red-700', 'neutral' => 'bg-gray-100 text-gray-600']; $sentimentVal = $msg->sentiment instanceof \App\Enums\SentimentType ? $msg->sentiment->value : $msg->sentiment; $sentimentClass = $sentimentColors[$sentimentVal] ?? 'bg-gray-100 text-gray-600'; $typeLabel = $msg->type instanceof \App\Enums\MessageType ? $msg->type->label() : ucfirst($msg->type); $isSelected = $selectedId === $msg->id; @endphp
{{-- Avatar initials --}}
{{ strtoupper(substr($msg->sender_name, 0, 1)) }}
{{-- Unread dot --}} @if(! $msg->is_read) @endif

{{ $msg->sender_name }}

@if($msg->is_starred) @endif {{ $msg->created_at->diffForHumans(short: true) }}

{{ Str::limit($msg->body, 80) }}

{{ ucfirst($sentimentVal) }} {{ $typeLabel }} @if($msg->is_resolved) Resolved @endif
@endforeach
{{ $messages->links() }}
@endif
{{-- ── Detail Panel ─────────────────────────────────────────────────────── --}}
@if($selectedMessage === null)

Select a message

Click on any message in the list to view details and reply

@else @php $msg = $selectedMessage; $sentimentVal = $msg->sentiment instanceof \App\Enums\SentimentType ? $msg->sentiment->value : $msg->sentiment; $sentimentColors = ['positive' => 'bg-green-100 text-green-700', 'negative' => 'bg-red-100 text-red-700', 'neutral' => 'bg-gray-100 text-gray-600']; $sentimentClass = $sentimentColors[$sentimentVal] ?? 'bg-gray-100 text-gray-600'; $typeLabel = $msg->type instanceof \App\Enums\MessageType ? $msg->type->label() : ucfirst($msg->type); $platform = $msg->socialAccount?->platform->value ?? ''; @endphp
{{-- Sender info --}}
{{ strtoupper(substr($msg->sender_name, 0, 1)) }}

{{ $msg->sender_name }}

{{ ucfirst($platform) }} · {{ $typeLabel }}

{{-- Sentiment + time --}}
{{ ucfirst($sentimentVal) }} {{ $msg->created_at->format('M j, Y g:i A') }} @if($msg->is_resolved) Resolved @endif
{{-- Post link --}} @if($msg->post_url) View original post → @endif
{{-- Message body --}}

{{ $msg->body }}

{{-- Actions --}}

Actions

@if($msg->is_read) @else @endif @if(! $msg->is_resolved) @endif
{{-- Reply section --}}

Reply

{{-- Tone selector --}}
{{-- AI suggestion --}} @if($aiReply)

{{ $aiReply }}

@endif {{-- Reply textarea --}} {{-- Buttons --}}
@endif