<?php
require __DIR__ . '/includes/functions.php';
$currentPage = 'account';
$pageTitle = 'Verify Email | Furnify';
$result = customer_verify_email_token(isset($_GET['c']) ? (int) $_GET['c'] : 0, isset($_GET['t']) ? (string) $_GET['t'] : '');
require __DIR__ . '/includes/header.php';
?>
<section class="page-section">
    <div class="container narrow">
        <div class="confirmation <?= $result['ok'] ? '' : 'error-state' ?>">
            <i class="bi <?= $result['ok'] ? 'bi-check-circle' : 'bi-exclamation-triangle' ?>" aria-hidden="true"></i>
            <p class="eyebrow">Email verification</p>
            <h1><?= $result['ok'] ? 'Verified successfully' : 'Verification problem' ?></h1>
            <p class="lead"><?= e($result['message']) ?></p>
            <div class="d-flex flex-wrap gap-2 justify-content-center mt-3">
                <a href="customer-dashboard.php" class="btn btn-primary">Go to Dashboard</a>
                <a href="index.php" class="btn btn-outline-primary">Back to Store</a>
            </div>
        </div>
    </div>
</section>
<?php require __DIR__ . '/includes/footer.php'; ?>
