// Add Fancybox
import { Fancybox } from 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.esm.js';

// Add Carousel
// import '@fancyapps/ui/dist/carousel.css';
import { Carousel } from 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/carousel.esm.js';

// Add `Autoplay` plugin
import { Autoplay } from 'https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/carousel.autoplay.esm.js';
Carousel.Plugins.Autoplay = Autoplay;

const diPropCarouselSel = document.querySelector("#diPropCarousel");
if(diPropCarouselSel) { const diPropCarousel = new Carousel(diPropCarouselSel, {Autoplay: false, 'center' : true, 'slidesPerPage' : 1,  Dots: false, Navigation: false}); }

const diPropIntCarouselSel = document.querySelector("#diPropIntCarousel");
if(diPropIntCarouselSel) { const diPropIntCarousel = new Carousel(diPropIntCarouselSel, {Autoplay: false, 'center' : true, 'slidesPerPage' : 1,  Dots: false, Navigation: false}); }

const diPropExtCarouselSel = document.querySelector("#diPropExtCarousel");
if(diPropExtCarouselSel) { const diPropExtCarousel = new Carousel(diPropExtCarouselSel, {Autoplay: false, 'center' : true, 'slidesPerPage' : 1,  Dots: false, Navigation: false}); }

const diPropPlanCarouselSel = document.querySelector("#diPropPlanCarousel");
if(diPropPlanCarouselSel) { const diPropPlanCarousel = new Carousel(diPropPlanCarouselSel, {Autoplay: false, 'infinite': false, 'center' : true, 'slidesPerPage' : 1,  Dots: true, Navigation: false}); }


// Make links clickable
// document.getElementById("plansLinks").addEventListener("click", (event) => {
//     const index = event.target.dataset.for || -1;
  
//     if (index > -1) {
//       event.preventDefault();
//       diPropPlanCarousel.slideTo(index);
//     }
//   });