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

@if (is_array($panel))
    @php
        $isOptional = ($panel['variant'] ?? '') === 'optional';
    @endphp

    @if ($isOptional)
        <details class="rounded-xl border border-gray-200 bg-gray-50/80 dark:border-gray-700 dark:bg-gray-900/40">
            <summary class="cursor-pointer px-4 py-3 text-sm font-medium text-gray-800 dark:text-gray-100">
                {{ $panel['optional_heading'] }}
            </summary>
            <div class="space-y-4 border-t border-gray-200 px-4 py-4 dark:border-gray-700">
                @include('components.dberp.system-update.partials.terminal-update-commands', ['panel' => $panel])
            </div>
        </details>
    @else
        <div class="space-y-4 rounded-xl border border-primary-200 bg-primary-50/50 p-4 dark:border-primary-500/30 dark:bg-primary-500/10">
            @include('components.dberp.system-update.partials.terminal-update-commands', ['panel' => $panel])
        </div>
    @endif
@endif
