"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 __());
    };
})();
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var TokenTutorialStyledComponents_1 = require("./TokenTutorialStyledComponents");
var WelcomeScreenContent_1 = require("./WelcomeScreenContent");
var styleConstants_1 = require("../styleConstants");
var TutorialWelcomeScreens = /** @class */ (function (_super) {
    __extends(TutorialWelcomeScreens, _super);
    function TutorialWelcomeScreens(props) {
        var _this = _super.call(this, props) || this;
        _this.welcomeNext = function () {
            var nextSlide = _this.state.activeWelcomeIdx + 1;
            if (nextSlide < WelcomeScreenContent_1.WelcomeScreenContent.length) {
                _this.setState({ activeWelcomeIdx: nextSlide });
            }
            else {
                _this.props.handleStartQuiz();
            }
        };
        _this.state = { activeWelcomeIdx: 0 };
        return _this;
    }
    TutorialWelcomeScreens.prototype.render = function () {
        var _this = this;
        var activeWelcomeIdx = this.state.activeWelcomeIdx;
        var progressColor;
        return (React.createElement(TokenTutorialStyledComponents_1.WelcomeSlide, null,
            WelcomeScreenContent_1.WelcomeScreenContent[activeWelcomeIdx].icon,
            React.createElement("h2", null, WelcomeScreenContent_1.WelcomeScreenContent[activeWelcomeIdx].title),
            React.createElement("p", null, WelcomeScreenContent_1.WelcomeScreenContent[activeWelcomeIdx].description),
            React.createElement(TokenTutorialStyledComponents_1.SlideProgress, null, WelcomeScreenContent_1.WelcomeScreenContent.map(function (x, idx) { return (React.createElement("svg", { key: idx, height: "10", width: "10" },
                idx === activeWelcomeIdx
                    ? (progressColor = styleConstants_1.colors.accent.CIVIL_BLUE)
                    : (progressColor = styleConstants_1.colors.accent.CIVIL_GRAY_4),
                React.createElement("circle", { cx: "5", cy: "5", r: "5", stroke: "none", strokeWidth: "0", fill: progressColor }))); })),
            React.createElement(TokenTutorialStyledComponents_1.WelcomeSlideBtns, { onClick: function () { return _this.welcomeNext(); } }, WelcomeScreenContent_1.WelcomeScreenContent[activeWelcomeIdx].btn)));
    };
    return TutorialWelcomeScreens;
}(React.Component));
exports.TutorialWelcomeScreens = TutorialWelcomeScreens;
//# sourceMappingURL=TutorialWelcomeScreens.js.map