"use strict";
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 TokensAccountRequirement_1 = require("./TokensAccountRequirement");
var TokensStyledComponents_1 = require("./TokensStyledComponents");
var TokensTextComponents_1 = require("./TokensTextComponents");
var elements_1 = require("@joincivil/elements");
var Tokens_1 = require("./Tokens");
// TODO(jorgelo) This should take into account whether the currentUser.ethAddress is same as MM address. They should have to reconnect if that is true. (Thanks Toby!)
exports.UserTokenAccountSignup = function (props) {
    var addWalletPath = props.addWalletPath, step = props.step, user = props.user;
    var renderConnectWallet = function () { return (React.createElement(React.Fragment, null,
        React.createElement(TokensStyledComponents_1.TokenRequirementIcon, { step: step },
            React.createElement(elements_1.TokenWalletIcon, null)),
        React.createElement(TokensTextComponents_1.TokenConnectWalletText, null),
        React.createElement(TokensStyledComponents_1.TokenBtns, { to: addWalletPath },
            React.createElement(TokensTextComponents_1.TokenConnectWalletBtnText, null)))); };
    var renderNotLoggedIn = function () { return (React.createElement(React.Fragment, null,
        React.createElement(TokensStyledComponents_1.TokenRequirementIcon, { step: step },
            React.createElement(elements_1.TokenWalletIcon, null)),
        React.createElement(TokensTextComponents_1.TokenAuthText, null))); };
    var renderAuthCard = function () {
        if (!user) {
            return renderNotLoggedIn();
        }
        return renderConnectWallet();
    };
    if (step === Tokens_1.TOKEN_PROGRESS.ACTIVE) {
        return (React.createElement(TokensStyledComponents_1.FlexColumnsPrimaryModule, { padding: true },
            React.createElement(TokensAccountRequirement_1.UserTokenAccountRequirement, null, renderAuthCard())));
    }
    return React.createElement(React.Fragment, null);
};
//# sourceMappingURL=TokensAccountSignup.js.map