"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var ExplorerLink_1 = require("./ExplorerLink");
var WaitingFor_1 = require("./WaitingFor");
var getStyleForTopLevelComponent_1 = require("../../core/utils/getStyleForTopLevelComponent");
var classFor_1 = require("../utils/classFor");
var CompanyLogo_1 = require("./CompanyLogo");
require("../styles/base/waitingForTransaction.sass");
require("../styles/themes/Legacy/waitingForTransactionThemeLegacy.sass");
require("../styles/themes/Jarvis/waitingForTransactionThemeJarvis.sass");
require("../styles/themes/UniLogin/waitingForTransactionThemeUniLogin.sass");
var Body = function (_a) {
    var action = _a.action, description = _a.description, relayerConfig = _a.relayerConfig, transactionHash = _a.transactionHash, className = _a.className, info = _a.info;
    return (react_1.default.createElement("div", null,
        react_1.default.createElement(WaitingFor_1.WaitingFor, { action: action, className: className, description: description }),
        react_1.default.createElement("div", { className: classFor_1.classForComponent('waitingfortransaction-modal-pending-section') },
            react_1.default.createElement("h3", { className: classFor_1.classForComponent('waitingfortransaction-transaction-hash-title') }, "Transaction hash"),
            react_1.default.createElement(ExplorerLink_1.ExplorerLink, { chainName: relayerConfig.chainSpec.name, transactionHash: transactionHash }),
            react_1.default.createElement("div", { className: classFor_1.classForComponent('waitingfortransaction-pending-img') })),
        info && react_1.default.createElement("p", { className: classFor_1.classForComponent('info-text') }, info)));
};
exports.WaitingForTransaction = function (props) { return (react_1.default.createElement("div", { className: classFor_1.useClassFor('waitingfortransaction') },
    react_1.default.createElement(CompanyLogo_1.CompanyLogo, null),
    react_1.default.createElement("div", { className: getStyleForTopLevelComponent_1.getStyleForTopLevelComponent(props.className) },
        react_1.default.createElement(Body, __assign({ description: exports.DEPLOYMENT_DESCRIPTION }, props))))); };
exports.WaitingForDeployment = function (props) { return (react_1.default.createElement(exports.WaitingForTransaction, __assign({}, props, { action: props.action || 'Wallet creation', description: props.description || exports.DEPLOYMENT_DESCRIPTION, info: props.info }))); };
exports.DEPLOYMENT_DESCRIPTION = 'It takes time to register your username and deploy your wallet. In order to do so, we need to create a transaction and wait until the Ethereum blockchain validates it.';
//# sourceMappingURL=WaitingForTransaction.js.map