var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { CustomLogger } from './../../../modules/custom-logger';
import { I18N } from 'aurelia-i18n';
import { bindable, customElement } from "aurelia-templating";
export var StepTimeline = (function () {
    function StepTimeline(logger, i18n) {
        this.logger = logger;
        this.i18n = i18n;
        this.isHorizontal = true;
        this.useCustonIcon = false;
    }
    StepTimeline.prototype.navigateToStep = function (step) {
        if (this.currentElement.step > step.step && !step.disabledClick()) {
            this.stepElements.filter(function (x) { return x.step > step.step; }).forEach(function (x) {
                x.isActif = false;
                x.isValidStep = false;
            });
            step.isValidStep = false;
            step.isActif = true;
            this.currentElement = step;
        }
        else {
            this.logger.LogError(this.i18n.tr("steptimeline.canNotNavigate"), null, null, true);
        }
    };
    __decorate([
        bindable,
        __metadata("design:type", Boolean)
    ], StepTimeline.prototype, "isHorizontal", void 0);
    __decorate([
        bindable,
        __metadata("design:type", Boolean)
    ], StepTimeline.prototype, "useCustonIcon", void 0);
    __decorate([
        bindable,
        __metadata("design:type", Array)
    ], StepTimeline.prototype, "stepElements", void 0);
    __decorate([
        bindable,
        __metadata("design:type", Object)
    ], StepTimeline.prototype, "currentElement", void 0);
    StepTimeline = __decorate([
        customElement('step-timeline'),
        __metadata("design:paramtypes", [CustomLogger, I18N])
    ], StepTimeline);
    return StepTimeline;
}());

//# sourceMappingURL=step-timeline.js.map
