/* Scoped to: ss-amusement-park-moments */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-amusement-park-moments"]');
  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-amusement-park-moments"] ~ ' + 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 tabs = document.querySelectorAll(".tab-heading"); const contents = document.querySelectorAll(".tab-content"); const halfLine = document.querySelector(".half-line"); tabs.forEach((tab) => { tab.addEventListener("click", () => { const index = Number(tab.dataset.index); tabs.forEach((t) => t.classList.remove("active")); tab.classList.add("active"); contents.forEach((c) => { c.classList.toggle("hidden", Number(c.dataset.index) !== index); }); }); });
  });
})();