export default class SliderManager {
    constructor(sliderSelector) {
        this.currentIndex = 0;
        this.slides = document.querySelectorAll(`${sliderSelector} .slide`);
        this.showSlide(this.currentIndex);
    }
    showSlide(index) {
        this.slides.forEach((slide, i) => {
            slide.style.display = i === index ? "block" : "none";
        });
    }
    nextSlide() {
        this.currentIndex = (this.currentIndex + 1) % this.slides.length;
        this.showSlide(this.currentIndex);
    }
    prevSlide() {
        this.currentIndex =
            (this.currentIndex - 1 + this.slides.length) % this.slides.length;
        this.showSlide(this.currentIndex);
    }
}
//# sourceMappingURL=SliderManager.js.map