"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 utils_1 = require("@joincivil/utils");
var styledComponents_1 = require("./styledComponents");
var textComponents_1 = require("./textComponents");
var ChallengeResultsChart_1 = require("../ChallengeResultsChart");
var QuestionToolTip_1 = require("../QuestionToolTip");
var AppealDecisionDetail_1 = require("./AppealDecisionDetail");
exports.RejectedCard = function (props) {
    var displayDateTime;
    var showAppealChallenge = props.appealChallengeTotalVotes &&
        props.appealChallengeVotesFor &&
        props.appealChallengeVotesAgainst &&
        props.appealChallengePercentFor &&
        props.appealChallengePercentAgainst;
    if (props.listingRemovedTimestamp) {
        var listingRemovedDateTime = utils_1.getLocalDateTimeStrings(props.listingRemovedTimestamp);
        displayDateTime = listingRemovedDateTime[0] + " " + listingRemovedDateTime[1];
    }
    return (React.createElement(styledComponents_1.StyledListingDetailPhaseCardContainer, null,
        React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(styledComponents_1.StyledPhaseDisplayName, null,
                React.createElement(textComponents_1.RejectedNewroomDisplayNameText, null),
                React.createElement(QuestionToolTip_1.QuestionToolTip, { explainerText: React.createElement(textComponents_1.RejectedNewsroomsToolTipText, null), positionBottom: true })),
            React.createElement(styledComponents_1.MetaItemLabel, null, "Rejected date"),
            React.createElement(styledComponents_1.MetaItemValue, null, displayDateTime)),
        React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
            React.createElement(ChallengeResultsChart_1.ChallengeResults, { headerText: "Challenge #" + props.challengeID + " Results", totalVotes: props.totalVotes, votesFor: props.votesFor, votesAgainst: props.votesAgainst, percentFor: props.percentFor, percentAgainst: props.percentAgainst, didChallengeSucceed: props.didChallengeOriginallySucceed })),
        props.appealRequested && React.createElement(AppealDecisionDetail_1.AppealDecisionDetail, { appealGranted: props.appealGranted }),
        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 })))));
};
//# sourceMappingURL=RejectedCard.js.map