"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Modal = void 0;
const react_1 = __importDefault(require("react"));
const Button_1 = require("../button/Button");
const Modal = ({ children, isOpen, toggle, closeText, className, }) => {
    const showModal = isOpen ? "show-modal" : "hide-modal";
    return (react_1.default.createElement("div", { className: "modal-wrapper " + showModal + " " + className },
        react_1.default.createElement("div", { className: "overlay", onClick: toggle }),
        react_1.default.createElement("div", { className: "grid modal" },
            react_1.default.createElement("div", { className: "col" },
                react_1.default.createElement("span", { className: "modal-close-x", onClick: toggle }, "\u00D7"),
                react_1.default.createElement("div", { className: "grid modal-body" },
                    react_1.default.createElement("div", { className: "col" }, children)),
                closeText
                    ? (react_1.default.createElement("div", { className: "grid grid-end" },
                        react_1.default.createElement("div", { className: "m-b-20 m-r-20" },
                            react_1.default.createElement(Button_1.Button, { className: "modal-close-button", size: "small", onClick: toggle, label: closeText }))))
                    : null))));
};
exports.Modal = Modal;
