import { initInstafeed } from '@assets/js/wpj.instafeed-init.js';

initInstafeed("cbdway.cz", 4);

if ($('#home-products').length) {
   import('@assets/js/wpj.carousel.js').then(wpjCarousel => {
      if ($('#home-products').length) {
         $('#home-products').wpjCarousel({
            itemsOnPage: 1.5,
            gutter: 20,
            controlsText: ['<span class="fc icons_caret-left"></span>', '<span class="fc icons_caret-right"></span>'],
            responsive: {
               544: {
                  itemsOnPage: 2.5,
                  gutter: 20
               },
               768: {
                  itemsOnPage: 3.5,
                  gutter: 20
               },
               1260: {
                  itemsOnPage: 4,
                  gutter: 20
               }
            }
         });
      }
   });
}

if ($('#home-products-category').length) {
   import('@assets/js/wpj.carousel.js').then(wpjCarousel => {
      if ($('#home-products-category').length) {
         $('#home-products-category').wpjCarousel({
            itemsOnPage: 1.5,
            gutter: 20,
            controlsText: ['<span class="fc icons_caret-left"></span>', '<span class="fc icons_caret-right"></span>'],
            responsive: {
               544: {
                  itemsOnPage: 2.5,
                  gutter: 20
               },
               768: {
                  itemsOnPage: 3.5,
                  gutter: 20
               },
               1260: {
                  itemsOnPage: 4,
                  gutter: 20
               }
            }
         });
      }
   });
}
