{"version":3,"file":"Src_Scripts_components_article-swiper_js.5bfb940c7dfb1b0a43e4.js","sources":["webpack://haveselskabet/./Src/Scripts/components/article-swiper.js"],"sourcesContent":[" import Swiper, { Navigation, Scrollbar } from 'swiper/core';\nSwiper.use([Navigation]);\nSwiper.use([Scrollbar]);\n\nexport default class ArticleSwiper {\n\n constructor(elm, args) {\n let slider;\n if (elm.querySelectorAll('.swiper-slide').length == 0) return;\n this.elm = elm;\n this.options = {\n loop: false,\n slidesPerView: 1.15,\n spaceBetween: 15,\n navigation: {\n nextEl: elm.querySelector('.swiper-button-next'),\n prevEl: elm.querySelector('.swiper-button-prev'),\n },\n breakpoints: {\n 768: {\n slidesPerView: 3,\n spaceBetween: 30,\n }\n },\n scrollbar: {\n el: elm.querySelector('.swiper-scrollbar'),\n draggable: true,\n },\n on: {\n init: function () {\n const event = new Event('swiper init');\n window.dispatchEvent(event);\n },\n }\n };\n\n this.swiper = import('swiper').then(s => {\n slider = new s.Swiper(this.elm, this.options);\n requestAnimationFrame(() => {\n slider.navigation.update();\n })\n });\n }\n\n update() {\n this.swiper.update();\n }\n\n destroy() {\n this.swiper.destroy();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;;A;;A","sourceRoot":""}