(() => {
  'use strict';

  const containers = document.querySelectorAll('.orokublocks-woocommerceproduct');

  if (containers.length > 0) {
    for (const container of containers) {
      // Carousel
      const carouselContainer = container.querySelector('.orokublocks-glide-carousel');

      if (carouselContainer) {
        const carouselOptions = {
          gap: 0
        };

        const carousel = new Glide(carouselContainer, carouselOptions).mount();
      }

      // Line Carousel
      const lineCarouselContainer = container.querySelector('.orokublocks-glide-carousel-line');

      if (lineCarouselContainer) {
        const lineCarouselOptions = {
          gap: 10,
          perView: 4,
          rewind: false
        };

        
        const lineCarousel = new Glide(lineCarouselContainer, lineCarouselOptions).mount();
      }
    }
  }
})();