import React from "react";
import { Button } from "../button/Button";
export const Modal = ({ children, isOpen, toggle, closeText, className, }) => {
    const showModal = isOpen ? "show-modal" : "hide-modal";
    return (React.createElement("div", { className: "modal-wrapper " + showModal + " " + className },
        React.createElement("div", { className: "overlay", onClick: toggle }),
        React.createElement("div", { className: "grid modal" },
            React.createElement("div", { className: "col" },
                React.createElement("span", { className: "modal-close-x", onClick: toggle }, "\u00D7"),
                React.createElement("div", { className: "grid modal-body" },
                    React.createElement("div", { className: "col" }, children)),
                closeText
                    ? (React.createElement("div", { className: "grid grid-end" },
                        React.createElement("div", { className: "m-b-20 m-r-20" },
                            React.createElement(Button, { className: "modal-close-button", size: "small", onClick: toggle, label: closeText }))))
                    : null))));
};
