@extends('layouts.nova') @section('content')
Received Messages Notifications
@if(($freshlyClearedCount ?? 0) > 0)
Marked {{ number_format((int) $freshlyClearedCount) }} new {{ (int) $freshlyClearedCount === 1 ? 'comment' : 'comments' }} as read when you opened this inbox.
@endif

Total comments

{{ number_format((int) ($stats['total'] ?? 0)) }}

All comments on your approved artworks.

Last 7 days

{{ number_format((int) ($stats['recent'] ?? 0)) }}

Recent conversation momentum.

Unique commenters

{{ number_format((int) ($stats['commenters'] ?? 0)) }}

Distinct people engaging with your work.

Active artworks

{{ number_format((int) ($stats['artworks'] ?? 0)) }}

Artworks that received comments.

@if($search !== '' || $sort !== 'newest') Reset @endif
@if($comments->isEmpty())

No comments found

@if($search !== '') Nothing matched your current search. Try a shorter phrase, a username, or reset the filters. @else When members comment on your artworks, they will appear here with artwork previews and quick context. @endif

@else
@foreach($comments as $comment) @php $author = $comment->user; $artwork = $comment->artwork; $profileUrl = !empty($author?->username) ? '/@' . $author->username : '/profile/' . (int) ($author?->id ?? 0); $artworkUrl = $artwork ? '/art/' . (int) $artwork->id . '/' . \Illuminate\Support\Str::slug($artwork->title ?? $artwork->name ?? 'artwork') : null; @endphp
@if($artwork) {{ $artwork->title ?? $artwork->name ?? 'Artwork' }} @else
@endif
{{ $author?->name ?? $author?->username ?? 'Member' }}
{{ $author?->name ?? $author?->username ?? 'Unknown member' }} @if(!empty($author?->username)) {{ '@' . $author->username }} @endif

{{ optional($comment->created_at)->diffForHumans() ?? 'Unknown time' }}

Comment #{{ $comment->id }} @if($artworkUrl) Open artwork @endif
{!! $comment->getDisplayHtml() !!}

Artwork

@if($artwork) {{ $artwork->title ?? $artwork->name ?? 'Untitled artwork' }} @else

This artwork is no longer available.

@endif
{{ optional($comment->created_at)->format('M j, Y H:i') ?? 'Unknown date' }}
@endforeach
{{ $comments->links() }}
@endif
@endsection