@props([
    'panel' => null,
])

@if (is_array($panel))
    <div class="space-y-4">
        <p class="text-sm text-gray-600 dark:text-gray-300">
            {{ $panel['intro'] }}
        </p>

        <div
            @class([
                'rounded-lg border px-4 py-3 text-sm',
                'border-success-300 bg-success-50 text-success-800 dark:border-success-500/40 dark:bg-success-500/10 dark:text-success-200' => $panel['can_run_browser_update'],
                'border-danger-300 bg-danger-50 text-danger-800 dark:border-danger-500/40 dark:bg-danger-500/10 dark:text-danger-200' => ! $panel['can_run_browser_update'],
            ])
        >
            <p class="font-medium">
                {{ $panel['summary_label'] }}：{{ $panel['summary_message'] }}
            </p>
            @if (($panel['blocking_count'] ?? 0) > 0 || ($panel['warning_count'] ?? 0) > 0)
                <p class="mt-1 text-xs opacity-90">
                    {{ $panel['blocking_count_label'] }} {{ $panel['blocking_count'] }}
                    ·
                    {{ $panel['warning_count_label'] }} {{ $panel['warning_count'] }}
                </p>
            @endif
        </div>

        @include('components.dberp.system-update.partials.environment-diagnostics-items', [
            'items' => $panel['items'],
            'suggestionLabel' => $panel['suggestion_label'],
        ])
    </div>
@endif
