import { __decorate, __extends } from "tslib";
import Vue from 'vue';
import Component from 'vue-class-component';
import WithRender from './carousel-item.html?style=./carousel-item.scss';
var MCarouselItem = /** @class */ (function (_super) {
    __extends(MCarouselItem, _super);
    function MCarouselItem() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.isVisible = false;
        _this.position = 0;
        _this.margin = 0;
        _this.animNotReady = true;
        return _this;
    }
    MCarouselItem.prototype.beforeEnter = function () {
        this.$emit('animationStart');
    };
    MCarouselItem.prototype.afterLeave = function () {
        this.$emit('animationDone');
    };
    Object.defineProperty(MCarouselItem.prototype, "translate", {
        get: function () {
            if (this.position === 0) {
                return 'translate(0)';
            }
            else {
                return "translate(calc(" + 100 * this.position + "% + " + (this.margin / 2) * this.position + "px))";
            }
        },
        enumerable: false,
        configurable: true
    });
    MCarouselItem.prototype.mounted = function () {
        var _this = this;
        setTimeout(function () {
            _this.animNotReady = false;
        });
    };
    MCarouselItem = __decorate([
        WithRender,
        Component
    ], MCarouselItem);
    return MCarouselItem;
}(Vue));
export { MCarouselItem };
//# sourceMappingURL=carousel-item.js.map