<?php
/**
 * Shared top-of-page navigation for the MRA EIS admin page suite.
 * Usage: set $eisNavCurrent to one of the keys below, then
 * require __DIR__ . '/../../includes/eis_admin_nav.php';
 * (adjust the relative path from views/admin/*.php).
 */
$eisNavItems = [
    'onboarding'          => ['label' => 'Onboarding',         'icon' => 'fa-network-wired', 'href' => 'mra_eis_onboarding.php'],
    'site_products'       => ['label' => 'Site Products',      'icon' => 'fa-boxes',         'href' => 'mra_eis_site_products.php'],
    'stock_batch_mapping' => ['label' => 'Stock Batch Mapping','icon' => 'fa-boxes',         'href' => 'mra_eis_stock_batch_mapping.php'],
    'compliance'          => ['label' => 'Compliance Outbox',  'icon' => 'fa-shield-alt',    'href' => 'mra_eis_compliance.php'],
    'configuration'       => ['label' => 'EIS Configuration',  'icon' => 'fa-cogs',          'href' => 'mra_eis_configuration.php'],
];
$eisNavCurrent = $eisNavCurrent ?? '';
?>
<style>
    .eisnav { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
    .eisnav a {
        display: inline-flex; align-items: center; gap: 7px;
        padding: 7px 13px; border-radius: 7px; font-size: 0.84rem; font-weight: 600;
        color: #5B6472; background: #fff; border: 1px solid #E3E7EE; text-decoration: none;
        transition: color .12s ease, border-color .12s ease, background .12s ease;
    }
    .eisnav a:hover { color: #2A5DB0; border-color: #2A5DB0; background: #E8F0FC; }
    .eisnav a.is-current { color: #fff; background: #202B3D; border-color: #202B3D; }
</style>
<nav class="eisnav" aria-label="MRA EIS pages">
    <?php foreach ($eisNavItems as $key => $item): ?>
        <a href="<?php echo htmlspecialchars($item['href']); ?>"<?php echo $key === $eisNavCurrent ? ' class="is-current" aria-current="page"' : ''; ?>>
            <i class="fas <?php echo htmlspecialchars($item['icon']); ?>"></i> <?php echo htmlspecialchars($item['label']); ?>
        </a>
    <?php endforeach; ?>
</nav>
