@extends('layouts.app')
@section('title', 'Backup')
@section('content')
    <x-page-head title="Backup & Recovery" subtitle="Snapshots & restore">
        <x-slot:actions>
            <form method="POST" action="{{ route('system.backup.run') }}">
                @csrf
                <button type="submit" class="btn btn-primary">Run Backup Now</button>
            </form>
        </x-slot:actions>
    </x-page-head>
    <x-panel>
        @if ($backups->isEmpty())
            <x-empty-state title="No backups yet" message="Run a backup to create your first snapshot." />
        @else
            <div class="table-wrap"><table><thead><tr><th>File</th><th>Size</th><th>Created</th></tr></thead><tbody>
                @foreach ($backups as $backup)
                    <tr><td>{{ $backup['name'] }}</td><td>{{ $backup['size'] }}</td><td>{{ $backup['date'] }}</td></tr>
                @endforeach
            </tbody></table></div>
        @endif
    </x-panel>
@endsection
