/* Scoped to: ss-education-template-what_our_student_say */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-education-template-what_our_student_say"]');
  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-education-template-what_our_student_say"] ~ ' + 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 slider = document.getElementById("slider"); const slides = slider.children.length; const tabs = document.querySelectorAll(".user-tab"); let currentSlide = 0; function updateSlider() { slider.style.transform = `translateX(-${currentSlide * 100}%)`; tabs.forEach((tab, index) => { if (index === currentSlide) { tab.classList.remove("bg-white"); tab.classList.add("bg-emerald-600", "text-white"); } else { tab.classList.remove("bg-emerald-600", "text-white"); tab.classList.add("bg-white"); } }); } window.nextSlide = function () { currentSlide = (currentSlide + 1) % slides; updateSlider(); }; window.prevSlide = function () { currentSlide = (currentSlide - 1 + slides) % slides; updateSlider(); }; updateSlider();
  });
})();