import { IndexCarousel } from "./IndexCarousel.js";
export class ArrayCarousel {
    _array;
    indexCarousel;
    constructor(array) {
        if (!Array.isArray(array)) {
            throw new Error('ArrayCarousel: "array" argument must be array');
        }
        this._array = array;
        this.indexCarousel = new IndexCarousel(array.length);
    }
    get array() {
        return this._array;
    }
    get currentIndex() {
        return this.indexCarousel.current;
    }
    set currentIndex(value) {
        this.indexCarousel.current = value;
    }
    get currentItem() {
        return this.array[this.currentIndex];
    }
    next() {
        this.indexCarousel.next();
        return this;
    }
    prev() {
        this.indexCarousel.prev();
        return this;
    }
}
//# sourceMappingURL=ArrayCarousel.js.map
