{ "version": 3, "sources": ["../../../Vettvangur.Frontend/src/scripts/components/notifications.ts"], "sourcesContent": ["import { dictionary } from 'helpers/dictionary'\nimport Swiper, { Autoplay, Controller, Navigation, Pagination, Parallax } from 'swiper'\n\nconst notifications = {\n el: {\n root: document.querySelector('.notifications'),\n target: document.querySelectorAll('.notifications .container'),\n pagination: document.querySelector('.notifications__pagination'),\n },\n\n init() {\n if (!this.el.root) {\n return\n }\n\n Array.prototype.forEach.call(this.el.target, (item: HTMLElement) => {\n Swiper.use([Autoplay, Controller, Navigation, Pagination, Parallax])\n const slider = item.querySelector('.swiper-container')\n this.initSwipers(slider)\n })\n },\n\n initSwipers(item) {\n const isSingleSlide = item.querySelectorAll('.notifications__item').length <= 1\n\n new Swiper(item, {\n allowTouchMove: !isSingleSlide,\n autoHeight: true,\n autoplay: false,\n breakpoints: {\n 775: {\n spaceBetween: 30,\n },\n },\n grabCursor: !isSingleSlide,\n loop: !isSingleSlide,\n spaceBetween: 15,\n speed: 750,\n navigation: {\n nextEl: '.notifications__nav-button .button--next',\n prevEl: '.notifications__nav-button .button--prev',\n },\n pagination: {\n bulletActiveClass: 'notifications__pagination-bullet--active',\n bulletClass: 'notifications__pagination-bullet',\n bulletElement: 'button',\n clickable: true,\n el: this.el.pagination,\n renderBullet: (index, className) =>\n ``,\n type: 'bullets',\n },\n })\n },\n}\n\nexport default notifications\n"], "mappings": "2JAGA,IAAMA,EAAgB,CACpB,GAAI,CACF,KAAM,SAAS,cAA2B,gBAAgB,EAC1D,OAAQ,SAAS,iBAA8B,2BAA2B,EAC1E,WAAY,SAAS,cAA2B,4BAA4B,CAC9E,EAEA,MAAO,CACA,KAAK,GAAG,MAIb,MAAM,UAAU,QAAQ,KAAK,KAAK,GAAG,OAASC,GAAsB,CAClEC,EAAO,IAAI,CAACC,EAAUC,EAAYC,EAAYC,EAAYC,CAAQ,CAAC,EACnE,IAAMC,EAASP,EAAK,cAAc,mBAAmB,EACrD,KAAK,YAAYO,CAAM,CACzB,CAAC,CACH,EAEA,YAAYP,EAAM,CAChB,IAAMQ,EAAgBR,EAAK,iBAAiB,sBAAsB,EAAE,QAAU,EAE9E,IAAIC,EAAOD,EAAM,CACf,eAAgB,CAACQ,EACjB,WAAY,GACZ,SAAU,GACV,YAAa,CACX,IAAK,CACH,aAAc,EAChB,CACF,EACA,WAAY,CAACA,EACb,KAAM,CAACA,EACP,aAAc,GACd,MAAO,IACP,WAAY,CACV,OAAQ,2CACR,OAAQ,0CACV,EACA,WAAY,CACV,kBAAmB,2CACnB,YAAa,mCACb,cAAe,SACf,UAAW,GACX,GAAI,KAAK,GAAG,WACZ,aAAc,CAACC,EAAOC,IACpB,mDAAmDA,kBAA0BC,EAC3E,UACF,KAAKF,eACP,KAAM,SACR,CACF,CAAC,CACH,CACF,EAEOG,EAAQb", "names": ["notifications", "item", "core_default", "Autoplay", "Controller", "Navigation", "Pagination", "Parallax", "slider", "isSingleSlide", "index", "className", "dictionary", "notifications_default"] }