<?= $this->extend('admin/layouts/main') ?>
<?= $this->section('content') ?>

<p class="text-muted mb-3">
    The platform's own Hubtel Checkout account — used to collect subscription payments FROM hotels
    (see a hotel's Billing &amp; Invoices tab). This is a completely separate merchant account from any
    individual hotel's own Hubtel credentials (those live in that hotel's own Integration Settings, for
    collecting from ITS guests). Stored encrypted in the control database, never in .env or hardcoded.
</p>

<div class="row justify-content-center">
    <div class="col-lg-8">
        <form action="<?= site_url('admin/settings') ?>" method="post">
            <?= csrf_field() ?>
            <div class="card">
                <div class="card-header">Hubtel Checkout (platform account)</div>
                <div class="card-body">
                    <div class="row g-3">
                        <div class="col-md-4">
                            <label class="form-label small fw-semibold">Client ID</label>
                            <input type="text" class="form-control" name="hubtel__client_id" value="<?= esc($values['hubtel.client_id']) ?>">
                        </div>
                        <div class="col-md-4">
                            <label class="form-label small fw-semibold">Client Secret</label>
                            <input type="password" class="form-control" name="hubtel__client_secret" placeholder="<?= $values['hubtel.client_secret'] ? 'Configured — leave blank to keep' : 'Not configured' ?>">
                        </div>
                        <div class="col-md-4">
                            <label class="form-label small fw-semibold">Merchant Account Number</label>
                            <input type="text" class="form-control" name="hubtel__merchant_account_number" value="<?= esc($values['hubtel.merchant_account_number']) ?>">
                        </div>
                    </div>
                </div>
            </div>

            <button type="submit" class="btn btn-primary mt-3"><i class="bi bi-save me-1"></i>Save Settings</button>
        </form>
    </div>
</div>

<?= $this->endSection() ?>
