{"version":3,"sources":["webpack:///D:/a/1/s/frontend/src/views/blocks/promotionContainer/js/promotionContainer.js"],"names":["PromotionContainer","element","_classCallCheck3","default","this","$el","$","data","dynamic","initSlider","find","slick","autoPlay","arrows","mobileFirst","dots","responsive","breakpoint","settings","slidesToShow","slidesToScroll"],"mappings":"8RAWaA,8BACZ,SAAAA,EAAYC,IAAS,EAAAC,EAAAC,SAAAC,KAAAJ,GAEpBI,KAAKC,IAAMC,EAAEL,wDAKO,IADPG,KAAKC,IAAIE,OACdC,SACPJ,KAAKK,kDAQUL,KAAKC,IAAIK,KAAT,8BAuCRC,OArCPC,UAAU,EACVC,QAAQ,EACRC,aAAa,EAGbC,MAAM,EACNC,aAEEC,WAAY,KACZC,UACCC,aAAc,EACdC,eAAgB,KAIjBH,WAAY,IACZC,UACCC,aAAc,EACdC,eAAgB,KAIjBH,WAAY,IACZC,UACCC,aAAc,EACdC,eAAgB,KAIjBH,WAAY,IACZC,UACCC,aAAc,EACdC,eAAgB","file":"block-75.b9f88d4cffa17521b332.js","sourcesContent":["// CONSTANTS are all caps.\nconst NS = 'PromotionContainer';\nconst CLS = 'promotionContainer';\n\n// Import stuff here if you need to or even better to import them dynamically\n// for ex. of dynamic import check out ./loadBlk.js using Webpack dynamic imports as chunks.\n// import $ from 'jquery'\n// import rPromotionContainer from './PromotionContainer.jsx';\n// import React from 'react';\n// import ReactDOM from 'react-dom';\n\nexport class PromotionContainer {\n\tconstructor(element) {\n\t\t// $el is the blk node return by the loadPromotionContainer function\n\t\tthis.$el = $(element);\n\t}\n\n\tinit() {\n\t\tconst data = this.$el.data();\n\t\tif(data.dynamic === true) {\n\t\t\tthis.initSlider();\n\t\t}\n\t}\n\n\tinitSlider() {\n\t\t// uncomment if need prev/next arrow buttons\n\t\t// const $prevArrow = this.$el.find(`.${CLS}-arrow--prev`);\n\t\t// const $nextArrow = this.$el.find(`.${CLS}-arrow--next`);\n\t\tconst $slider = this.$el.find(`.${CLS}-slider`);\n\t\tconst slickOptions = {\n\t\t\tautoPlay: true,\n\t\t\tarrows: false,\n\t\t\tmobileFirst: true,\n\t\t\t// prevArrow: $prevArrow,\n\t\t\t// nextArrow: $nextArrow,\n\t\t\tdots: true,\n\t\t\tresponsive: [\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 1200,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 4,\n\t\t\t\t\t\tslidesToScroll: 4,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 992,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 3,\n\t\t\t\t\t\tslidesToScroll: 3,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 768,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 2,\n\t\t\t\t\t\tslidesToScroll: 2,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tbreakpoint: 576,\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tslidesToShow: 1,\n\t\t\t\t\t\tslidesToScroll: 1,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t\t$slider.slick(slickOptions);\n\t}\n\n\t// Add more functions like on above here\n}\n"],"sourceRoot":""}