"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 LoadingIndicator_1 = require("./LoadingIndicator");
var ModalContent_1 = require("./ModalContent");
var Button_1 = require("./Button");
var icons_1 = require("./icons");
exports.ProgressModalContentInProgress = function (props) {
    var content = props.children || React.createElement(ModalContent_1.ModalHeading, null, "Your transaction is in progress.");
    return (React.createElement(React.Fragment, null,
        React.createElement(LoadingIndicator_1.LoadingIndicator, { height: 100, width: 150 }),
        content,
        React.createElement(ModalContent_1.ModalContentInsetContainer, null,
            React.createElement(ModalContent_1.ModalContent, null, "Your transaction is processing. This can take several minutes. Please don't close the tab."),
            React.createElement(ModalContent_1.ModalContent, null, "How about taking a little breather and standing for a bit? Maybe even stretching?"))));
};
exports.ProgressModalContentSuccess = function (props) {
    var handleOnClick = function (event) {
        if (props.hideModal) {
            props.hideModal();
        }
    };
    return (React.createElement(React.Fragment, null,
        React.createElement(ModalContent_1.ModalHeading, null, "Success!"),
        React.createElement(ModalContent_1.ModalContentInsetContainer, null,
            React.createElement(ModalContent_1.ModalContent, null, "Transaction processed.")),
        React.createElement(Button_1.Button, { onClick: handleOnClick, size: Button_1.buttonSizes.MEDIUM }, "Ok!")));
};
exports.ProgressModalContentError = function (props) {
    var handleOnClick = function (event) {
        if (props.hideModal) {
            props.hideModal();
        }
    };
    if (props.children) {
        return (React.createElement(React.Fragment, null,
            React.createElement(ModalContent_1.StyledModalErrorContainer, null,
                React.createElement(icons_1.OctopusErrorIcon, null)),
            props.children,
            React.createElement(Button_1.Button, { onClick: handleOnClick, size: Button_1.buttonSizes.MEDIUM }, "Dismiss")));
    }
    return (React.createElement(React.Fragment, null,
        React.createElement(ModalContent_1.StyledModalErrorContainer, null,
            React.createElement(icons_1.OctopusErrorIcon, null)),
        React.createElement(ModalContent_1.ModalHeading, null, "Uh oh!"),
        React.createElement(ModalContent_1.ModalContent, null, "Your transaction failed. Please try again."),
        React.createElement(Button_1.Button, { onClick: handleOnClick, size: Button_1.buttonSizes.MEDIUM }, "Dismiss")));
};
exports.ProgressModalContentMobileUnsupported = function (props) {
    var handleOnClick = function (event) {
        if (props.hideModal) {
            props.hideModal();
        }
    };
    return (React.createElement(React.Fragment, null,
        React.createElement(ModalContent_1.StyledModalErrorContainer, null,
            React.createElement(icons_1.OctopusErrorIcon, null)),
        React.createElement(ModalContent_1.ModalHeading, null, "We're sorry, this action is only available on desktop."),
        React.createElement(ModalContent_1.ModalContentInsetContainer, null,
            React.createElement(ModalContent_1.ModalContent, null, "Transactions requiring MetaMask on mobile are not available yet, but they're coming. In the meantime, you can still browse newsroom listings on our site.")),
        React.createElement(Button_1.Button, { onClick: handleOnClick, size: Button_1.buttonSizes.MEDIUM }, "Continue")));
};
//# sourceMappingURL=ProgressModalContent.js.map