"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;
};
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 ListingSummaryBase_1 = __importDefault(require("./ListingSummaryBase"));
var textComponents_1 = require("./textComponents");
var ChallengeOrAppealStatementSummary_1 = __importDefault(require("./ChallengeOrAppealStatementSummary"));
var ListingPhaseLabel_1 = __importDefault(require("./ListingPhaseLabel"));
var NewsroomInfo_1 = __importDefault(require("./NewsroomInfo"));
var SummaryActionButton_1 = __importDefault(require("./SummaryActionButton"));
var PhaseCountdownOrTimestamp_1 = __importDefault(require("./PhaseCountdownOrTimestamp"));
var AppealJudgementBanner_1 = __importDefault(require("./AppealJudgementBanner"));
var ChallengeResults_1 = __importStar(require("./ChallengeResults"));
exports.ListingSummaryApprovedComponent = function (props) {
    var challengeID = props.challengeID, canListingAppealBeResolved = props.canListingAppealBeResolved, canListingAppealChallengeBeResolved = props.canListingAppealChallengeBeResolved;
    var banner;
    if (canListingAppealBeResolved || canListingAppealChallengeBeResolved) {
        banner = React.createElement(AppealJudgementBanner_1.default, __assign({}, props));
    }
    else if (challengeID) {
        banner = (React.createElement(styledComponents_1.StyledUnderChallengeBanner, null,
            React.createElement(textComponents_1.UnderChallengeBannerText, null)));
    }
    return (React.createElement(ListingSummaryBase_1.default, __assign({}, props),
        React.createElement(styledComponents_1.StyledListingSummary, { hasTopPadding: !challengeID },
            banner,
            React.createElement(ListingPhaseLabel_1.default, __assign({}, props)),
            React.createElement(NewsroomInfo_1.default, __assign({}, props)),
            React.createElement(ChallengeResults_1.default, __assign({}, props)),
            React.createElement(ChallengeResults_1.AppealChallengeResults, __assign({}, props)),
            React.createElement(styledComponents_1.StyledListingSummarySection, null,
                React.createElement(ChallengeOrAppealStatementSummary_1.default, __assign({}, props)),
                React.createElement(PhaseCountdownOrTimestamp_1.default, __assign({}, props)),
                React.createElement(SummaryActionButton_1.default, __assign({}, props))))));
};
//# sourceMappingURL=ListingSummaryApproved.js.map