"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var Step_1 = require("./Step");
require("./Stepper.less");
var cssClass = {
    STEPS_DISPLAY: "Stepper--stepsDisplay",
};
var Stepper = /** @class */ (function (_super) {
    __extends(Stepper, _super);
    function Stepper() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    Stepper.prototype.render = function () {
        var _a = this.props, currentStepID = _a.currentStepID, steps = _a.steps, seekableStates = _a.seekableStates, onStepClick = _a.onStepClick, className = _a.className;
        return (React.createElement("ul", { className: cssClass.STEPS_DISPLAY }, steps.map(function (step, idx) { return (React.createElement("li", { key: step.id },
            React.createElement(Step_1.default, { className: className, title: step.title, description: step.description, label: idx + 1, id: step.id, state: step.state, current: step.id === currentStepID, warning: step.warning, optional: step.optional, onClick: !seekableStates || seekableStates.includes(step.state) ? onStepClick : null }))); })));
    };
    return Stepper;
}(React.PureComponent));
exports.default = Stepper;
