"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 AppealDecisionBanner = function (props) {
    var appeal = props.appeal, appealGranted = props.appealGranted, doesChallengeHaveAppeal = props.doesChallengeHaveAppeal, isAwaitingAppealJudgement = props.isAwaitingAppealJudgement, didChallengeOriginallySucceed = props.didChallengeOriginallySucceed;
    if (!doesChallengeHaveAppeal && !isAwaitingAppealJudgement) {
        return React.createElement(React.Fragment, null);
    }
    var decisionText = React.createElement(React.Fragment, null);
    if (isAwaitingAppealJudgement) {
        decisionText = (React.createElement(styledComponents_1.StyledNotGrantedResultsBanner, null,
            React.createElement(icons_1.HollowGrayNotGranted, null),
            " Appeal requested"));
    }
    else if (appeal) {
        if (appeal.appealGranted || 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"));
                // Challenge failed (newsroom accepted) and appeal was granted, so newsroom is rejected
                //
            }
            else {
                decisionText = (React.createElement(styledComponents_1.StyledRejectedResultsBanner, null,
                    React.createElement(icons_1.HollowRedNoGood, null),
                    " Appeal granted to reject Newsroom"));
            }
        }
        else {
            decisionText = (React.createElement(styledComponents_1.StyledNotGrantedResultsBanner, null,
                React.createElement(icons_1.HollowGrayNotGranted, null),
                " Appeal requested but not granted"));
        }
    }
    return decisionText;
};
exports.default = AppealDecisionBanner;
//# sourceMappingURL=AppealJudgementBanner.js.map