"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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var styledComponents_1 = require("./styledComponents");
var textComponents_1 = require("./textComponents");
var TransactionButton_1 = require("../TransactionButton");
var ChallengePhaseDetail_1 = require("./ChallengePhaseDetail");
var ChallengeResultsChart_1 = require("../ChallengeResultsChart");
var NeedHelp_1 = __importDefault(require("./NeedHelp"));
var AppealDecisionDetail_1 = require("./AppealDecisionDetail");
var QuestionToolTip_1 = require("../QuestionToolTip");
exports.AppealChallengeResolveCard = function (props) {
    var showAppealChallenge = props.appealChallengeTotalVotes &&
        props.appealChallengeVotesFor &&
        props.appealChallengeVotesAgainst &&
        props.appealChallengePercentFor &&
        props.appealChallengePercentAgainst;
    return (React.createElement(styledComponents_1.StyledListingDetailPhaseCardContainer, null,
        React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(styledComponents_1.StyledPhaseKicker, null,
                "Challenge ID ",
                props.challengeID),
            React.createElement(styledComponents_1.StyledPhaseKicker, null,
                "Appeal Challenge ID ",
                props.appealChallengeID),
            React.createElement(styledComponents_1.StyledPhaseDisplayName, null,
                React.createElement(textComponents_1.ReadyToCompletePhaseDisplayNameText, null),
                React.createElement(QuestionToolTip_1.QuestionToolTip, { explainerText: React.createElement(textComponents_1.ResolveChallengeToolTipText, null), positionBottom: true }))),
        React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(ChallengePhaseDetail_1.ChallengePhaseDetail, { challengeID: props.challengeID, challenger: props.challenger, isViewingUserChallenger: props.isViewingUserChallenger, rewardPool: props.rewardPool, stake: props.stake, dispensationPct: props.dispensationPct })),
        React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(ChallengeResultsChart_1.ChallengeResults, { collapsable: true, totalVotes: props.totalVotes, votesFor: props.votesFor, votesAgainst: props.votesAgainst, percentFor: props.percentFor, percentAgainst: props.percentAgainst, didChallengeSucceed: props.didChallengeSucceed })),
        React.createElement(AppealDecisionDetail_1.AppealDecisionDetail, { appealGranted: props.appealGranted, appealGrantedStatementURI: props.appealGrantedStatementURI }),
        showAppealChallenge && (React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(ChallengeResultsChart_1.ChallengeResults, { headerText: "Appeal Challenge #" + props.appealChallengeID + " Results", totalVotes: props.appealChallengeTotalVotes, votesFor: props.appealChallengeVotesFor, votesAgainst: props.appealChallengeVotesAgainst, percentFor: props.appealChallengePercentFor, percentAgainst: props.appealChallengePercentAgainst, didChallengeSucceed: props.didAppealChallengeSucceed, isAppealChallenge: true }))),
        React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(styledComponents_1.CTACopy, null, "This challenge is complete. To update this Newsroom's status on the Civil Registry, please resolve this appeal challenge."),
            React.createElement(TransactionButton_1.TransactionButtonNoModal, { transactions: props.transactions }, "Resolve Appeal Challenge")),
        React.createElement(NeedHelp_1.default, { faqURL: props.faqURL })));
};
//# sourceMappingURL=AppealChallengeResolveCard.js.map