"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 Button_1 = require("../Button");
var TransactionButton_1 = require("../TransactionButton");
var PhaseCountdown_1 = require("../PhaseCountdown/");
var NeedHelp_1 = __importDefault(require("./NeedHelp"));
var InApplicationCard = /** @class */ (function (_super) {
    __extends(InApplicationCard, _super);
    function InApplicationCard() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.renderSubmitChallengeButton = function () {
            if (_this.props.submitChallengeURI) {
                return (React.createElement(React.Fragment, null,
                    React.createElement(Button_1.InvertedButton, { size: Button_1.buttonSizes.MEDIUM, to: _this.props.submitChallengeURI }, "Submit a Challenge")));
            }
            return (React.createElement(TransactionButton_1.TransactionInvertedButton, { transactions: _this.props.transactions }, "Submit a Challenge"));
        };
        return _this;
    }
    InApplicationCard.prototype.render = function () {
        return (React.createElement(styledComponents_1.StyledListingDetailPhaseCardContainer, null,
            React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
                React.createElement(styledComponents_1.StyledPhaseDisplayName, null,
                    React.createElement(textComponents_1.NewApplicationDisplayNameText, null)),
                React.createElement(PhaseCountdown_1.ProgressBarCountdownTimer, { endTime: this.props.endTime, totalSeconds: this.props.phaseLength, displayLabel: "Waiting for approval", toolTipText: React.createElement(textComponents_1.NewApplicationToolTipText, { phaseLength: this.props.phaseLength }), flavorText: "under community review" })),
            React.createElement(styledComponents_1.StyledListingDetailPhaseCardSection, null,
                React.createElement(styledComponents_1.CTACopy, null,
                    "If you believe this newsroom does not align with the",
                    " ",
                    React.createElement("a", { href: this.props.constitutionURI }, "Civil Constitution"),
                    ", you may challenge this newsroom.",
                    " ",
                    React.createElement("a", { href: this.props.learnMoreURL }, "Learn More"),
                    "."),
                this.renderSubmitChallengeButton()),
            React.createElement(NeedHelp_1.default, { faqURL: this.props.faqURL })));
    };
    return InApplicationCard;
}(React.Component));
exports.InApplicationCard = InApplicationCard;
//# sourceMappingURL=InApplicationCard.js.map