<nav class="nav-bottom">
  <?php
  $currentRoute = $_GET['route'] ?? '';
  $bottomItems = [
    ['/', 'icon-home', 'الرئيسية', null],
    ['/games', 'icon-games', 'العاب', null],
    ['/tournaments', 'icon-trophy', 'بطولات', 'tournaments_enabled'],
    ['/friends', 'icon-friends', 'اجتماعي', null],
    ['/profile', 'icon-profile', 'حسابي', null],
  ];
  foreach ($bottomItems as $item):
    $href = $item[0];
    $icon = $item[1];
    $label = $item[2];
    $flag = $item[3];
    if ($flag && !is_feature_enabled($flag)) continue;
    $route = trim($href, '/');
    $isActive = ($route === '' && $currentRoute === '') || ($route !== '' && $currentRoute === $route);
  ?>
  <a href="<?= $href ?>" class="nav-bottom-item <?= $isActive ? 'active' : '' ?>">
    <svg class="icon"><use href="/public/icons/sprite.svg#<?= $icon ?>"></use></svg>
    <span class="nav-bottom-label"><?= $label ?></span>
  </a>
  <?php endforeach; ?>
</nav>
