/* Scoped to: sports-template-champion-league */
(function() {
  'use strict';
  var componentRoots = document.querySelectorAll('[data-component-slug="sports-template-champion-league"]');
  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-champion-league"] ~ ' + 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 yearBtns = document.querySelectorAll(".year-btn"); const yearContents = document.querySelectorAll(".year-content"); yearBtns.forEach(btn => { btn.addEventListener("click", () => { const index = btn.dataset.index; yearBtns.forEach(b => b.classList.remove("active")); btn.classList.add("active"); yearContents.forEach(content => { content.classList.toggle( "hidden", content.dataset.index !== index ); }); }); }); const video = document.getElementById("myVideo"); const playBtn = document.getElementById("playButton"); playBtn.addEventListener("click", () => { video.play(); playBtn.style.display = "none"; }); video.addEventListener("ended", () => { playBtn.style.display = "block"; });
  });
})();