import Navigation from "../../Utils/Navigation";
import { ButtonStyleType } from "../Button/Button";
import { IconType } from "../Icon/Icon";
import Modal from "../Modal/Modal";
import IconProp from "../../../Types/Icon/IconProp";
import React from "react";
const PageError = (props) => {
    let message = props.message;
    if (props.message === "Server Error") {
        message = "Network Error: Please reload the page and try again.";
    }
    return (React.createElement(Modal, { title: props.title || "Oops, something went wrong.", icon: IconProp.Alert, iconType: IconType.Danger, onSubmit: () => {
            Navigation.reload();
        }, submitButtonStyleType: ButtonStyleType.NORMAL, submitButtonText: "Reload Page" },
        React.createElement("p", { className: "text-sm text-gray-500" }, message)));
};
export default PageError;
//# sourceMappingURL=PageError.js.map