<?php

// Location: /pwa/components/pwa_nav.php
if (!isset($role)) { $role = 'solar'; }

$base = '/pwa';

function pwa_link($base, $role, $page) {
    return $base . '/' . $role . '/' . $page . '.php';
}
?>
<nav class="pwa-bottom-nav" data-role="<?php echo htmlspecialchars($role); ?>">
    <a href="<?php echo pwa_link($base, $role, 'dashboard'); ?>"
       class="pwa-nav-item" data-page="dashboard">
        <div class="pwa-nav-icon">🏠</div>
        <div class="pwa-nav-label">Home</div>
    </a>
    <a href="<?php echo pwa_link($base, $role, 'customers'); ?>"
       class="pwa-nav-item" data-page="customers">
        <div class="pwa-nav-icon">👥</div>
        <div class="pwa-nav-label">Customers</div>
    </a>
    <a href="<?php echo pwa_link($base, $role, 'followups'); ?>"
       class="pwa-nav-item" data-page="followups">
        <div class="pwa-nav-icon">🔔</div>
        <div class="pwa-nav-label">Follow-ups</div>
    </a>
    <a href="<?php echo pwa_link($base, $role, 'tasks'); ?>"
       class="pwa-nav-item" data-page="tasks">
        <div class="pwa-nav-icon">✅</div>
        <div class="pwa-nav-label">Tasks</div>
    </a>
    <a href="<?php echo pwa_link($base, $role, 'settings'); ?>"
       class="pwa-nav-item" data-page="settings">
        <div class="pwa-nav-icon">⚙️</div>
        <div class="pwa-nav-label">Settings</div>
    </a>
</nav>
