"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 DashboardStyledComponents_1 = require("./DashboardStyledComponents");
var DashboardTextComponents_1 = require("./DashboardTextComponents");
var Button_1 = require("../Button");
exports.DashboardUserInfoSummary = function (props) {
    var buyCvlUrl = props.buyCvlUrl, challengesWonTotalCvl = props.challengesWonTotalCvl, rewardsEarned = props.rewardsEarned;
    var buyBtnProps = { href: buyCvlUrl };
    if (buyCvlUrl.charAt(0) === "/") {
        buyBtnProps = { to: buyCvlUrl };
    }
    return (React.createElement(DashboardStyledComponents_1.StyledUserInfo, null,
        React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionLabel, null,
            React.createElement(DashboardTextComponents_1.YourPublicAddressLabelText, null)),
        React.createElement(DashboardStyledComponents_1.StyledUserAddress, null, props.userAccount),
        React.createElement(DashboardStyledComponents_1.StyledUserInfoSection, null,
            React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionLabel, null,
                React.createElement(DashboardTextComponents_1.BalanceLabelText, null)),
            React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionValue, null,
                React.createElement("strong", null, props.balance))),
        React.createElement(DashboardStyledComponents_1.StyledUserInfoSection, null,
            React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionLabel, null,
                React.createElement(DashboardTextComponents_1.VotingBalanceLabelText, null)),
            React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionValue, null,
                React.createElement("strong", null, props.votingBalance))),
        challengesWonTotalCvl && (React.createElement(DashboardStyledComponents_1.StyledUserInfoSection, null,
            React.createElement(React.Fragment, null,
                React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionLabel, null,
                    React.createElement(DashboardTextComponents_1.ChallengesWonLabelText, null)),
                React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionValue, null,
                    React.createElement("strong", null, challengesWonTotalCvl))))),
        rewardsEarned && (React.createElement(DashboardStyledComponents_1.StyledUserInfoSection, null,
            React.createElement(React.Fragment, null,
                React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionLabel, null,
                    React.createElement(DashboardTextComponents_1.RewardsClaimedLabelText, null)),
                React.createElement(DashboardStyledComponents_1.StyledUserInfoSectionValue, null,
                    React.createElement("strong", null, rewardsEarned))))),
        React.createElement(DashboardStyledComponents_1.StyledUserInfoButtonSection, null,
            React.createElement(Button_1.Button, __assign({ size: Button_1.buttonSizes.MEDIUM_WIDE }, buyBtnProps), "Buy or Sell Civil Tokens"))));
};
//# sourceMappingURL=DashboardUserInfoSummary.js.map