<div class="space-y-3">
    @if ($events->isEmpty())
        <p class="text-sm text-gray-500 dark:text-gray-400">
            No audit history exists yet for {{ $label }}.
        </p>
    @else
        @foreach ($events as $event)
            <div class="rounded-lg bg-gray-50 px-4 py-3 dark:bg-white/5">
                <div class="flex flex-wrap items-center gap-x-3 gap-y-1">
                    <span class="text-sm font-semibold text-gray-900 dark:text-white">
                        {{ \App\Support\Audit\AuditActionId::labelFor((string) $event->action) }}
                    </span>

                    <span class="text-xs text-gray-500 dark:text-gray-400">
                        {{ $event->recorded_at?->diffForHumans() ?? 'Unknown time' }}
                    </span>

                    <span class="text-xs text-gray-500 dark:text-gray-400">
                        {{ $event->actorDisplayLabel() }}
                    </span>
                </div>

                <p class="mt-2 text-sm text-gray-700 dark:text-gray-300">
                    {{ $event->summaryText() }}
                </p>
            </div>
        @endforeach
    @endif
</div>