@props([
    'panel' => [],
    'showLearnMore' => false,
    'learnMoreLabel' => '',
])

@if (($panel['show_intro'] ?? true) && filled($panel['intro'] ?? null))
    <p class="text-sm text-gray-700 dark:text-gray-200">
        {{ $panel['intro'] }}
    </p>
@endif

@if ($showLearnMore && ($panel['show_guidance'] ?? true))
    <details class="text-sm text-gray-600 dark:text-gray-300">
        <summary class="cursor-pointer font-medium text-gray-700 dark:text-gray-200">
            {{ $learnMoreLabel }}
        </summary>
        <ul class="mt-2 list-disc space-y-1 pl-5">
            @foreach ($panel['guidance_lines'] ?? [] as $line)
                <li>{{ $line }}</li>
            @endforeach
        </ul>
    </details>
@endif

@if ($panel['commands_ready'] ?? false)
    <div class="space-y-1">
        <p class="text-sm text-gray-600 dark:text-gray-300">
            {{ $panel['execution_hint'] }}
        </p>
        <p class="text-xs font-medium uppercase tracking-wide text-gray-500 dark:text-gray-400">
            {{ $panel['combined_label'] }}
        </p>
        <pre class="overflow-x-auto rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm text-gray-900 select-all dark:border-gray-600 dark:bg-gray-950 dark:text-gray-100"><code>{{ $panel['combined_command'] }}</code></pre>
    </div>

    @if (filled($panel['php_hint'] ?? null))
        <p class="text-xs text-gray-500 dark:text-gray-400">
            {{ $panel['php_hint'] }}
        </p>
    @endif

    @if (($panel['show_guidance'] ?? true))
        <details class="text-sm text-gray-600 dark:text-gray-300">
            <summary class="cursor-pointer font-medium text-gray-700 dark:text-gray-200">
                {{ __('dberp.system_update_center.terminal.advanced_commands_label') }}
            </summary>
            <div class="mt-3 space-y-3">
                <div class="space-y-1">
                    <p class="text-xs font-medium text-gray-500 dark:text-gray-400">{{ $panel['cd_label'] }}</p>
                    <pre class="overflow-x-auto rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm select-all dark:border-gray-600 dark:bg-gray-950 dark:text-gray-100"><code>{{ $panel['cd_command'] }}</code></pre>
                </div>
                <div class="space-y-1">
                    <p class="text-xs font-medium text-gray-500 dark:text-gray-400">{{ $panel['run_label'] }}</p>
                    <pre class="overflow-x-auto rounded-lg border border-gray-200 bg-white px-3 py-2 text-sm select-all dark:border-gray-600 dark:bg-gray-950 dark:text-gray-100"><code>{{ $panel['run_command'] }}</code></pre>
                </div>
            </div>
        </details>
    @endif

    @if (filled($panel['copy_hint'] ?? null))
        <p class="text-xs text-gray-500 dark:text-gray-400">
            {{ $panel['copy_hint'] }}
        </p>
    @endif
@endif
