var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
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);
};
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import styled from "styled-components";
import { theme } from "../../../../css/globalStyle";
import { IoIosCheckmarkCircle } from "react-icons/io";
import { IoWarning } from "react-icons/io5";
// By default, the Parent takes up the whole space of the SubmittingContainer
// parent. This is so they can't click buttons underneath this Loader.
var Parent = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n  background: ", ";\n  position: absolute;\n  top: 0px;\n  opacity: 0.7;\n"], ["\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  width: 100%;\n  height: 100%;\n  background: ", ";\n  position: absolute;\n  top: 0px;\n  opacity: 0.7;\n"])), theme.color.grey[900]);
var Inner = styled.div.attrs({
    className: "animate__animated animate__fadeInUp faster"
})(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n"], ["\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n"])));
export var SubmittingResult = function (_a) {
    var additionalStyles = _a.additionalStyles, submitError = _a.submitError, successText = _a.successText;
    return (_jsx(Parent, __assign({ style: additionalStyles }, { children: _jsxs(Inner, { children: [submitError.message === null && (_jsx(IoIosCheckmarkCircle, { size: "25px", color: theme.color.success[500] })), submitError.message !== null && (_jsx(IoWarning, { size: "25px", color: theme.color.error[500] })), _jsx("div", __assign({ style: { marginTop: "10px", textAlign: "center" } }, { children: submitError.message || successText }))] }) })));
};
var templateObject_1, templateObject_2;
//# sourceMappingURL=index.js.map