<?php

use yii\helpers\Html;
use yii\helpers\Url;

$this->title = 'Database Backup Setup';
$this->params['breadcrumbs'][] = $this->title;

?>

<div class="setup-index">
    <div class="row">
        <div class="col-lg-8 col-md-10">
            <div class="card">
                <div class="card-header bg-primary text-white">
                    <h3 class="card-title mb-0">
                        <i class="fa fa-cog"></i> Database Backup Module Setup
                    </h3>
                </div>
                <div class="card-body">
                    <p class="lead">Welcome to the Database Backup Module setup wizard!</p>
                    
                    <p>This wizard will help you configure the backup module with optional encryption support.</p>
                    
                    <div class="alert alert-info">
                        <i class="fa fa-info-circle"></i>
                        <strong>What you'll set up:</strong>
                        <ul class="mb-0">
                            <li>Basic module configuration</li>
                            <li>Encryption settings (optional)</li>
                            <li>Multi-system authorization (optional)</li>
                            <li>Initial encryption key generation</li>
                        </ul>
                    </div>

                    <h5>Setup Steps:</h5>
                    <ol>
                        <li><strong>Configure Settings</strong> - Set encryption preferences</li>
                        <li><strong>Generate Encryption Key</strong> - Create a secure encryption key</li>
                        <li><strong>Test Encryption</strong> - Verify encryption works correctly</li>
                        <li><strong>Review Configuration</strong> - Copy configuration to your app config</li>
                    </ol>

                    <hr>

                    <div class="form-group mt-4">
                        <?= Html::a(
                            '<i class="fa fa-arrow-right"></i> Continue to Configuration',
                            ['setup/configure'],
                            ['class' => 'btn btn-primary btn-lg']
                        ) ?>
                    </div>

                    <div class="alert alert-warning mt-4">
                        <i class="fa fa-exclamation-triangle"></i>
                        <strong>Important:</strong> Make sure to save the encryption key in a secure location.
                        Without the correct encryption key, encrypted backups cannot be restored.
                    </div>
                </div>
            </div>

            <div class="card mt-4">
                <div class="card-header bg-secondary text-white">
                    <h5 class="card-title mb-0">
                        <i class="fa fa-book"></i> Documentation
                    </h5>
                </div>
                <div class="card-body">
                    <p>For more information, see:</p>
                    <ul>
                        <li><a href="<?= Yii::getAlias('@web/docs/ENCRYPTION.md') ?>" target="_blank">Encryption Documentation</a></li>
                        <li><a href="<?= Yii::getAlias('@web/docs/SECURITY.md') ?>" target="_blank">Security Review</a></li>
                        <li><a href="<?= Yii::getAlias('@web/docs/README.md') ?>" target="_blank">Module README</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<style>
.setup-index ol li {
    margin-bottom: 10px;
}
</style>
