<?php
/** @var \BotGuard\Core\View $this @var \BotGuard\Core\Csrf $csrf @var array $data */
$this->layout('install.layout');
?>
<h2 class="h4 mb-1">Administrator Account</h2>
<p class="text-secondary small mb-4">This account has full access to the admin panel.</p>

<form method="post" action="/install/administrator" novalidate>
    <?= $csrf->field() ?>
    <div class="mb-3">
        <label class="form-label">Full name</label>
        <input type="text" name="admin_name" class="form-control" value="<?= e($data['admin_name'] ?? '') ?>" required>
    </div>
    <div class="mb-3">
        <label class="form-label">Email</label>
        <input type="email" name="admin_email" class="form-control" value="<?= e($data['admin_email'] ?? ($data['license_email'] ?? '')) ?>" required>
    </div>
    <div class="row g-3">
        <div class="col-md-6 mb-3">
            <label class="form-label">Password</label>
            <input type="password" name="admin_password" class="form-control" minlength="8" required>
            <div class="form-text">Minimum 8 characters.</div>
        </div>
        <div class="col-md-6 mb-3">
            <label class="form-label">Confirm password</label>
            <input type="password" name="admin_password_confirmation" class="form-control" minlength="8" required>
        </div>
    </div>
    <div class="d-flex justify-content-between mt-4">
        <a href="/install/database" class="btn btn-outline-secondary">Back</a>
        <button class="btn btn-primary" type="submit">Continue <i class="bi bi-arrow-right"></i></button>
    </div>
</form>
