---
// Default subsite nav — used when a subsite exists but no specialized nav is available
import { API_URL } from "../../config";
const whitelabel = Astro.props?.whitelabel ?? null;
const currentPath = Astro.url.pathname;
---

<script src="/scripts/nav-controls.js" defer data-api-url={API_URL}></script>

<nav class="w-full px-4 sm:px-6 py-3 sticky top-0 z-50 backdrop-blur-xl bg-white/75 dark:bg-[#0a0a0a]/75 border-b border-neutral-200/40 dark:border-neutral-800/40 shadow-sm shadow-neutral-900/5 dark:shadow-black/20">
  <div class="max-w-7xl mx-auto flex items-center justify-between">
    <a href="/" class="text-xl sm:text-2xl font-bold tracking-tight bg-gradient-to-r from-neutral-900 to-neutral-600 dark:from-white dark:to-neutral-400 bg-clip-text text-transparent whitespace-nowrap hover:opacity-80 transition-opacity font-['IBM_Plex_Sans',sans-serif]">
      {whitelabel?.logoText ?? 'Subsite'}
    </a>
    <div class="flex items-center gap-4">
      <!-- placeholder for future global subsite nav items -->
      <button aria-label="Toggle theme" type="button" class="flex items-center justify-center w-8 h-8 rounded-md hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors" onclick="toggleTheme()">
      </button>
    </div>
  </div>
</nav>
