export default class GalleryManager {
    constructor(gallerySelector) {
        this.currentIndex = 0;
        this.images = document.querySelectorAll(`${gallerySelector} img`);
        this.images.forEach((image, index) => {
            image.addEventListener("click", () => this.selectImage(index));
        });
    }
    selectImage(index) {
        this.currentIndex = index;
    }
    nextImage() {
        this.selectImage((this.currentIndex + 1) % this.images.length);
    }
    prevImage() {
        this.selectImage((this.currentIndex - 1 + this.images.length) % this.images.length);
    }
}
//# sourceMappingURL=GalleryManager.js.map