/* Scoped to: ss-agriculture-template-navbar */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-agriculture-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="ss-agriculture-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 agriMenuBtn = document.getElementById("agri-menu-btn"); const agriCloseBtn = document.getElementById("agri-close-btn"); const agriMobileMenu = document.getElementById("agri-mobile-menu"); const agriOverlay = document.getElementById("agri-overlay"); function toggleAgriMenu() { agriMobileMenu.classList.toggle("-translate-x-full"); if (agriOverlay) agriOverlay.classList.toggle("hidden"); } if (agriMenuBtn) agriMenuBtn.addEventListener("click", toggleAgriMenu); if (agriCloseBtn) agriCloseBtn.addEventListener("click", toggleAgriMenu); if (agriOverlay) agriOverlay.addEventListener("click", toggleAgriMenu);
  });
})();