"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 __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 styledComponents_1 = require("./styledComponents");
var textComponents_1 = require("./textComponents");
var DepositOrStakeAmount = function (props) {
    if (props.inChallengeCommitVotePhase ||
        props.isInAppealChallengeCommitPhase ||
        props.inChallengeRevealPhase ||
        props.isInAppealChallengeRevealPhase ||
        props.canResolveChallenge ||
        props.canListingAppealChallengeBeResolved ||
        props.isAwaitingAppealJudgement ||
        props.isAwaitingAppealChallenge) {
        return React.createElement(ChallengeStake, __assign({}, props));
    }
    else if (props.isInApplication || props.canBeWhitelisted || props.isWhitelisted) {
        return React.createElement(UnstakedDeposit, __assign({}, props));
    }
    return null;
};
var UnstakedDeposit = function (props) {
    if (!props.unstakedDeposit && !props.isWhitelisted) {
        return null;
    }
    return (React.createElement(styledComponents_1.MetaRow, null,
        React.createElement(styledComponents_1.MetaItemLabel, null,
            React.createElement(textComponents_1.AmountDepositedLabelText, null)),
        React.createElement(styledComponents_1.MetaItemValue, null, props.unstakedDeposit)));
};
var ChallengeStake = function (props) {
    if (!props.challengeStake) {
        return null;
    }
    return (React.createElement(styledComponents_1.MetaRow, null,
        React.createElement(styledComponents_1.MetaItemLabel, null,
            React.createElement(textComponents_1.AmountStakedChallengeLabelText, null)),
        React.createElement(styledComponents_1.MetaItemValue, null, props.challengeStake)));
};
exports.default = DepositOrStakeAmount;
//# sourceMappingURL=DepositOrStakeAmount.js.map