/* Scoped to: sports-template-players */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="sports-template-players"]');
  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="sports-template-players"] ~ ' + 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
    document.addEventListener("DOMContentLoaded", () => { const slider = document.getElementById("slider"); const leftBtn = document.getElementById("slideLeft"); const rightBtn = document.getElementById("slideRight"); rightBtn.addEventListener("click", () => { slider.scrollBy({ left: slider.clientWidth, behavior: "smooth" }); }); leftBtn.addEventListener("click", () => { slider.scrollBy({ left: -slider.clientWidth, behavior: "smooth" }); }); });
  });
})();