import './view.taxonomy-clients.block-ticker.scss';

import 'swiper/scss';
import 'swiper/scss/effect-fade';
import Swiper from 'swiper/bundle';

Drupal.behaviors.blockTicker = {
  attach(context) {
    const SWIPER = context.querySelector('.view--block-ticker .swiper');
    if (!SWIPER) return;

    new Swiper(SWIPER, {
      slidesPerView: "auto",
      spaceBetween: 30, // Adjust as needed for spacing between ticker items
      loop: true,
      speed: 5000, // Adjust for desired scroll speed
      allowTouchMove: false,
      autoplay: {
        enabled: true,
        delay: 0,
        disableOnInteraction: false,
      },
    });
  }
};
