/* Scoped to: sports-template-navbar */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="sports-template-navbar"]');
  componentRoots.forEach(function(componentRoot) {
    // Helper to query within component, with fallback to document for sibling elements
    var $ = function(sel) { 
      return componentRoot.querySelector(sel) || document.querySelector('[data-component-slug="sports-template-navbar"] ~ ' + sel) || document.querySelector(sel);
    };
    var $$ = function(sel) { 
      var results = componentRoot.querySelectorAll(sel);
      return results.length ? results : document.querySelectorAll(sel);
    };
    // Original component JS runs in this scope
    const menuBtn = document.getElementById("menu-btn"); const closeBtn = document.getElementById("close-btn"); const mobileMenu = document.getElementById("mobile-menu"); function toggleMenu() { mobileMenu.classList.toggle("-translate-x-full"); } menuBtn.addEventListener("click", toggleMenu); closeBtn.addEventListener("click", toggleMenu); const links = document.querySelectorAll(".nav-link"); const currentPage = window.location.pathname.split("/").pop(); links.forEach((link) => { if (link.getAttribute("href") === currentPage) { link.classList.add("bg-[#940F0F80]"); } });
  });
})();