"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 styledComponents_1 = require("./styledComponents");
var constants_1 = require("./constants");
var ChallengeResultsChartTextComponents_1 = require("./ChallengeResultsChartTextComponents");
exports.VoteTypeSummaryRow = function (props) {
    var color = constants_1.voteColor[props.voteType];
    return (React.createElement(styledComponents_1.VoteTypeSummary, null,
        React.createElement(styledComponents_1.VotesPerTokenContainer, null,
            React.createElement(styledComponents_1.VotesPerTokenVote, { vote: props.voteType }, ChallengeResultsChartTextComponents_1.voteTypeLabel[props.voteType])),
        React.createElement(styledComponents_1.BreakdownBarContainer, null,
            React.createElement(styledComponents_1.BreakdownBarPercentageLabel, null,
                props.votesPercent && (props.votesPercent.indexOf("NaN") < 0 ? props.votesPercent : "0"),
                "%"),
            React.createElement(styledComponents_1.BreakdownBarTotalContainer, null,
                React.createElement(styledComponents_1.BreakdownBarTotal, null,
                    React.createElement(styledComponents_1.BreakdownBarPercentage, { vote: props.voteType, percentage: props.votesPercent, color: color })),
                React.createElement(styledComponents_1.VotesPerTokenCount, null, props.votesCount)))));
};
//# sourceMappingURL=VoteTypeSummaryRow.js.map