class HeroSlider extends HTMLElement{constructor(){super(),this.mountSlider(),window.addEventListener("shopify:block:select",e=>{const selectedSlideIndex=+e.target.dataset.index;this.slider.slideTo(selectedSlideIndex,600)})}mountSlider(){const autoplayOptions={delay:this.dataset.autoplayInterval};this.slider=new Swiper(this,{effect:"fade",rewind:!0,slidesPerView:1,speed:600,followFinger:!1,navigation:{nextEl:".swiper-button--next",prevEl:".swiper-button--prev"},autoplay:this.dataset.autoplay==="true"?autoplayOptions:!1})}}customElements.define("hero-slider",HeroSlider);
//# sourceMappingURL=/cdn/shop/t/12/assets/hero-slider.js.map?v=110312743345158952681682758932
