/* Scoped to: ss-dental-about-carousel */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="ss-dental-about-carousel"]');
  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-dental-about-carousel"] ~ ' + 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
    (function () { setTimeout(function () { var tabsNav = document.querySelector("[data-tabs-nav]"); var tabsContent = document.querySelector("[data-tabs-content]"); if (!tabsNav || !tabsContent) return; var tabBtns = tabsNav.querySelectorAll("[data-tab]"); var tabPanels = tabsContent.querySelectorAll("[data-tab-panel]"); function switchTab(tabNum) { tabBtns.forEach(function (btn) { var isActive = btn.getAttribute("data-tab") === tabNum; if (isActive) { btn.classList.remove( "text-gray-500", "border-transparent", "hover:text-gray-700" ); btn.classList.add("text-[#007C8A]", "border-[#007C8A]"); } else { btn.classList.remove("text-[#007C8A]", "border-[#007C8A]"); btn.classList.add( "text-gray-500", "border-transparent", "hover:text-gray-700" ); } }); tabPanels.forEach(function (panel) { var isActive = panel.getAttribute("data-tab-panel") === tabNum; if (isActive) { panel.classList.remove("hidden"); } else { panel.classList.add("hidden"); } }); } tabBtns.forEach(function (btn) { btn.addEventListener("click", function () { var tabNum = this.getAttribute("data-tab"); switchTab(tabNum); }); }); }, 0); })();
  });
})();