@extends('layouts.app')

@section('title', 'Backup')

@section('content')
<div class="container-fluid">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <h4>Database Backup</h4>
                </div>
                <div class="card-body">
                    <div class="alert alert-info">
                        <i class="fas fa-info-circle"></i>
                        Create a backup of your database to prevent data loss.
                    </div>
                    
                    <form method="POST" action="{{ route('backup.create') }}">
                        @csrf
                        
                        <div class="form-group">
                            <label for="backup_name">Backup Name</label>
                            <input type="text" class="form-control" id="backup_name" 
                                   name="backup_name" value="backup_{{ date('Y_m_d_H_i_s') }}">
                        </div>
                        
                        <div class="form-check mb-3">
                            <input type="checkbox" class="form-check-input" id="include_data" name="include_data" checked>
                            <label class="form-check-label" for="include_data">
                                Include all data
                            </label>
                        </div>
                        
                        <div class="text-center">
                            <button type="submit" class="btn btn-primary">
                                <i class="fas fa-database"></i> Create Backup
                            </button>
                        </div>
                    </form>
                    
                    <hr>
                    
                    <h5>Recent Backups</h5>
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                                <tr>
                                    <th>#</th>
                                    <th>Backup Name</th>
                                    <th>Size</th>
                                    <th>Date</th>
                                    <th>Actions</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td colspan="5" class="text-center">
                                        No backups found
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection