@php
    $passedChecks = collect($surface['passedChecks'] ?? [])
        ->filter(static fn (mixed $check): bool => is_array($check))
        ->values();
@endphp

<div data-shared-zone="passed">
    @if ($passedChecks->isEmpty())
        <div class="text-sm text-gray-600 dark:text-gray-300">
            No passing checks recorded.
        </div>
    @else
        <div class="space-y-2">
            @foreach ($passedChecks as $check)
                @php
                    $title = is_string($check['title'] ?? null) && trim((string) $check['title']) !== '' ? trim((string) $check['title']) : 'Check';
                    $statusSpec = \App\Support\Badges\BadgeRenderer::spec(
                        \App\Support\Badges\BadgeDomain::VerificationCheckStatus,
                        $check['status'] ?? null,
                    );
                @endphp

                <div class="flex items-center justify-between gap-3 rounded-lg border border-gray-200 bg-white p-3 text-sm shadow-sm dark:border-gray-800 dark:bg-gray-900">
                    <div class="font-medium text-gray-900 dark:text-white">
                        {{ $title }}
                    </div>
                    <x-filament::badge :color="$statusSpec->color" :icon="$statusSpec->icon" size="sm">
                        {{ $statusSpec->label }}
                    </x-filament::badge>
                </div>
            @endforeach
        </div>
    @endif
</div>