export default class CarouselManager {
    constructor(containerId) {
        this.currentIndex = 0;
        this.container = document.getElementById(containerId);
        this.items = this.container.querySelectorAll(".carousel-item");
        this.setupButtons();
    }
    setupButtons() {
        document
            .getElementById("prevBtn")
            .addEventListener("click", () => this.movePrev());
        document
            .getElementById("nextBtn")
            .addEventListener("click", () => this.moveNext());
    }
    movePrev() {
        if (this.currentIndex > 0) {
            this.items[this.currentIndex].classList.remove("active");
            this.currentIndex--;
            this.items[this.currentIndex].classList.add("active");
        }
    }
    moveNext() {
        if (this.currentIndex < this.items.length - 1) {
            this.items[this.currentIndex].classList.remove("active");
            this.currentIndex++;
            this.items[this.currentIndex].classList.add("active");
        }
    }
}
//# sourceMappingURL=CarouselManager.js.map