"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 icons_1 = require("../icons");
var styledComponents_1 = require("./styledComponents");
var ChallengeResultsBanner = function (props) {
    var appeal = props.appeal, didChallengeOriginallySucceed = props.didChallengeOriginallySucceed, canBeWhitelisted = props.canBeWhitelisted;
    var decisionText = null;
    if (appeal && appeal.appealGranted) {
        if (didChallengeOriginallySucceed) {
            // Challenge succeeded (newsroom rejected) and appeal was granted, so newsroom is accepted
            decisionText = (React.createElement(styledComponents_1.StyledBaseResultsBanner, null,
                React.createElement(icons_1.HollowGreenCheck, null),
                " Appeal granted to accept Newsroom"));
        }
        else {
            // Challenge failed (newsroom accepted) and appeal was granted, so newsroom is rejected
            decisionText = (React.createElement(styledComponents_1.StyledRejectedResultsBanner, null,
                React.createElement(icons_1.HollowRedNoGood, null),
                " Appeal granted to reject Newsroom"));
        }
    }
    else if (didChallengeOriginallySucceed) {
        // Challenge succeeded (newsroom rejected)
        decisionText = (React.createElement(styledComponents_1.StyledRejectedResultsBanner, null,
            React.createElement(icons_1.HollowRedNoGood, null),
            " Community voted to reject Newsroom"));
    }
    else if (canBeWhitelisted) {
        // Challenge failed (newsroom accepted)
        decisionText = (React.createElement(styledComponents_1.StyledBaseResultsBanner, null,
            React.createElement(icons_1.HollowGreenCheck, null),
            " Newsroom application passed without challenge"));
    }
    else if (!didChallengeOriginallySucceed) {
        // Challenge failed (newsroom accepted)
        decisionText = (React.createElement(styledComponents_1.StyledBaseResultsBanner, null,
            React.createElement(icons_1.HollowGreenCheck, null),
            " Community voted to accept Newsroom"));
    }
    return decisionText;
};
exports.default = ChallengeResultsBanner;
//# sourceMappingURL=ChallengeResultsBanner.js.map