<?php
/**
 * Admin: "Dashboard" page
 *
 *
 */
if (!defined('ABSPATH')) {
    exit;
}
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$active_tab = isset($_GET['tab']) ? sanitize_text_field( wp_unslash($_GET['tab'])) : 'welcome';
?>
<div class="wrap">
    
<?php

    ?>
 <h2 class="nav-tab-wrapper">
        <a href="?page=chama&tab=welcome" class="nav-tab <?php echo $active_tab == 'welcome' ? 'nav-tab-active' : ''; ?>">Welcome</a>
        <a href="?page=chama&tab=getting-started" class="nav-tab <?php echo $active_tab == 'getting-started' ? 'nav-tab-active' : ''; ?>">Getting Started</a>
        <a href="?page=chama&tab=upgrade" class="nav-tab <?php echo $active_tab == 'upgrade' ? 'nav-tab-active' : ''; ?>">Upgrade</a>
        </h2>



<div class="chama-card">

<?php
switch ($active_tab) {
        case 'welcome':
            include_once CHAMA_PATH . 'views/admin-dashboard-welcome.php'; // @phpstan-ignore-line
            break;
        case 'getting-started':
            include_once CHAMA_PATH . 'views/admin-dashboard-getting-started.php'; // @phpstan-ignore-line
            break;
        case 'upgrade':
            include_once CHAMA_PATH . 'views/admin-dashboard-upgrade.php'; // @phpstan-ignore-line
            break;

    }
?>
</div>
</div>
<?php
