@extends('install.layout')

@section('content')
    <div class="card-header py-3">
        <h5 class="mb-0"><i class="fas fa-clipboard-check text-primary"></i> Özet & Kurulum</h5>
    </div>
    <div class="card-body">
        <p class="text-muted small">Aşağıdaki bilgileri onaylayın. "Kur" tuşu veritabanını hazırlar (migrate + üretim tohumlaması), yöneticiyi oluşturur ve kurulumu kilitler.</p>

        <table class="table table-sm" style="color:#e2e8f0;">
            <tbody>
                <tr style="border-color:#334155;"><th style="width:40%;">Site / Şirket</th><td>{{ $data['site_name'] ?? '—' }}</td></tr>
                <tr style="border-color:#334155;"><th>Uygulama URL</th><td>{{ $data['app_url'] ?? '—' }}</td></tr>
                <tr style="border-color:#334155;"><th>Zaman Dilimi</th><td>{{ $data['timezone'] ?? '—' }}</td></tr>
                <tr style="border-color:#334155;"><th>Dil</th><td>{{ $data['locale'] ?? '—' }}</td></tr>
                <tr style="border-color:#334155;"><th>Yönetici</th><td>{{ $data['admin_name'] ?? '—' }} &lt;{{ $data['admin_email'] ?? '—' }}&gt;</td></tr>
                <tr style="border-color:#334155;"><th>Lisans</th><td>{{ isset($data['license_key']) ? \Illuminate\Support\Str::mask($data['license_key'], '*', 6) : '—' }}</td></tr>
            </tbody>
        </table>

        <div class="alert alert-warning small">
            <i class="fas fa-triangle-exclamation"></i> Kurulum birkaç dakika sürebilir; sayfayı kapatmayın.
        </div>
    </div>
    <div class="card-footer d-flex justify-content-between" style="background:transparent;border-color:#334155;">
        <a href="{{ route('install.admin') }}" class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> Geri</a>
        <form method="POST" action="{{ route('install.run') }}">
            @csrf
            <button type="submit" class="btn btn-success"><i class="fas fa-rocket"></i> Kur</button>
        </form>
    </div>
@endsection
