<?php
// Sidebar/menu (lean). Pass $menuItems = [['label'=>'DNS','href'=>'dashboard.php?dns'], ...]
$menuItems = $menuItems ?? [];
?>
<div class="collapse navbar-collapse" id="navbar-menu">
  <div class="navbar navbar-dark">
    <div class="container-xl">
      <ul class="navbar-nav">
        <?php foreach ($menuItems as $item):
          $label = $item['label'] ?? '';
          $href = $item['href'] ?? '#';
          $active = !empty($item['active']) ? 'active' : '';
        ?>
          <li class="nav-item">
            <a class="nav-link <?php echo $active; ?>" href="<?php echo htmlspecialchars($href, ENT_QUOTES, 'UTF-8'); ?>">
              <span class="nav-link-title"><?php echo htmlspecialchars($label, ENT_QUOTES, 'UTF-8'); ?></span>
            </a>
          </li>
        <?php endforeach; ?>
      </ul>
    </div>
  </div>
</div>
