<?php
declare(strict_types=1);
// ==================================================
// Nuclear Fancy Pants Edition™ — NUCLEAR+++
// File: /templates/partials/tabs.php
// Description: Shared tab navigation partial — included by every admin page template - NUCLEAR+++
// Last Edited: 2026-05-17
// ==================================================
namespace AutoMarketerAI;
defined('ABSPATH') || exit;
$current_page = sanitize_key((string) ($_GET['page'] ?? ''));
$tabs = [
    'automarketer-ai'            => 'Dashboard',
    'automarketer-ai-modules'    => 'Modules',
    'automarketer-ai-social'     => 'Social Media',
    'automarketer-ai-reputation' => 'Reputation',
    'automarketer-ai-billing'    => 'Plans',
];
?>
<div class="amai-tabs-wrap">
    <nav class="amai-tabs">
        <?php foreach ($tabs as $slug => $label):
            $is_active = ($current_page === $slug);
            $classes   = 'amai-tab' . ($is_active ? ' amai-tab-active' : '');
        ?>
            <a href="<?php echo esc_url(admin_url('admin.php?page=' . $slug)); ?>"
               class="<?php echo esc_attr($classes); ?>">
                <?php echo esc_html($label); ?>
            </a>
        <?php endforeach; ?>
    </nav>
    <?php
    $setup_active  = ($current_page === 'automarketer-ai-setup');
    $setup_classes = 'amai-tab amai-tab--setup' . ($setup_active ? ' amai-tab-active' : '');
    ?>
    <a href="<?php echo esc_url(admin_url('admin.php?page=automarketer-ai-setup')); ?>"
       class="<?php echo esc_attr($setup_classes); ?>">
        Setup
    </a>
</div>