/* Scoped to: ss-tourism-template-who_we_are */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-tourism-template-who_we_are"]');
  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-tourism-template-who_we_are"] ~ ' + 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 cards = document.querySelectorAll(".about_main-card"); const images = document.querySelectorAll(".about_main-image"); images.forEach((img) => { img.classList.toggle("hidden", img.dataset.index !== "0"); if (img.dataset.index === "0" && (!img.getAttribute("src") || img.getAttribute("src") === "")) { img.src = img.dataset.nodeDefault; } }); cards.forEach((card) => { card.addEventListener("click", () => { const index = card.dataset.index; cards.forEach((c) => { c.classList.remove("bg-[#133D3F]", "text-white"); c.classList.add("bg-white", "text-black"); }); card.classList.remove("bg-white", "text-black"); card.classList.add("bg-[#133D3F]", "text-white"); images.forEach((img) => { const isActive = img.dataset.index === index; if (isActive) { if (!img.getAttribute("src") || img.getAttribute("src") === "") { img.src = img.dataset.nodeDefault; } img.classList.remove("hidden"); } else { img.classList.add("hidden"); } }); }); });
  });
})();