"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "getNormalizedIndex", {
    enumerable: true,
    get: function() {
        return getNormalizedIndex;
    }
});
const getNormalizedIndex = (index, slidesAmount, loop)=>{
    if (slidesAmount <= 0) {
        return 0;
    }
    if (loop) {
        return (index % slidesAmount + slidesAmount) % slidesAmount;
    }
    return Math.max(0, Math.min(slidesAmount - 1, index));
};
