{"version":3,"file":"card_carousel-CqhxXZWc.js","sources":["../../../app/javascript/entrypoints/js/carousels/card_carousel.js"],"sourcesContent":["import Swiper from \"swiper/bundle\";\n// import Swiper and modules styles\nimport 'swiper/css';\nimport 'swiper/css/navigation';\n\n\n\nexport default class CardCarousel {\n constructor(el) {\n this.carousel = el;\n this.swiper = null;\n }\n\n init() {\n this.initSwiper(this.carousel)\n\n }\n\n initSwiper(carousel) {\n this.swiper = new Swiper(carousel, {\n direction: \"horizontal\",\n spaceBetween: 5,\n slidesPerView: 1,\n speed: 800,\n loop: true,\n navigation: {\n nextEl: carousel.parentElement.parentElement.querySelector(\".product-card-carousel-button-next\"),\n prevEl: carousel.parentElement.parentElement.querySelector(\".product-card-carousel-button-prev\"),\n },\n preventClicks: true,\n preventClicksPropagation: true,\n touchStartForcePreventDefault: true,\n threshold: 2,\n pagination: {\n el: \".product-card-pagination\",\n },\n keyboard: {\n enabled: true,\n onlyInViewport: false,\n },\n });\n }\n\n\n}\n"],"names":["CardCarousel","el","carousel","Swiper"],"mappings":"6CAOe,MAAMA,CAAa,CAC9B,YAAYC,EAAI,CACZ,KAAK,SAAWA,EAChB,KAAK,OAAS,IACjB,CAED,MAAO,CACH,KAAK,WAAW,KAAK,QAAQ,CAEhC,CAED,WAAWC,EAAU,CACjB,KAAK,OAAS,IAAIC,EAAOD,EAAU,CAC/B,UAAW,aACX,aAAc,EACd,cAAe,EACf,MAAO,IACP,KAAM,GACN,WAAY,CACR,OAAQA,EAAS,cAAc,cAAc,cAAc,oCAAoC,EAC/F,OAAQA,EAAS,cAAc,cAAc,cAAc,oCAAoC,CAClG,EACD,cAAe,GACf,yBAA0B,GAC1B,8BAA+B,GAC/B,UAAW,EACX,WAAY,CACR,GAAI,0BACP,EACD,SAAU,CACN,QAAS,GACT,eAAgB,EACnB,CACb,CAAS,CACJ,CAGL"}