import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from 'react';
import { useAppSelector } from 'src/app/redux/store';
import { _cx } from 'src/utility/class';
import css from '../ModalModule.module.scss';
import ModalComp from '../dynamic/Modal';
import Button from 'src/components/Button';
var cx = _cx(css);
var ModalModule = function (props) {
    var setShowModal = props.setShowModal, size = props.size, children = props.children, title = props.title, subTitle = props.subTitle, modalHeader = props.modalHeader, description = props.description, closeButton = props.closeButton, footnote = props.footnote;
    var _a = useAppSelector(function (state) { return state.config.config; }), language = _a.language, languageData = _a.languageData;
    var t = languageData[language];
    return (_jsx(ModalComp, { show: true, size: size, onHide: setShowModal, centered: true, className: cx('container-modal'), children: _jsxs("div", { className: cx('modal-main'), children: [_jsxs("div", { className: cx('modal-header'), children: [_jsx("div", { className: cx('close'), onClick: setShowModal, children: _jsx("svg", { width: "15", height: "16", viewBox: "0 0 15 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M1.5 15.5L0 14L6 8L0 2L1.5 0.5L7.5 6.5L13.5 0.5L15 2L9 8L15 14L13.5 15.5L7.5 9.5L1.5 15.5Z", fill: "#3D3935" }) }) }), modalHeader && _jsx("p", { className: cx('modalHeader'), children: modalHeader }), (title || description) && (_jsxs("div", { className: cx('modal-subheadings'), children: [title && (_jsx("h2", { className: cx('headline'), dangerouslySetInnerHTML: {
                                        __html: title === null || title === void 0 ? void 0 : title.replace('®', '<sup>®</sup>'),
                                    } })), subTitle && _jsx("div", { className: cx('subTitle'), children: subTitle }), description && (_jsx("p", { className: cx('description'), dangerouslySetInnerHTML: {
                                        __html: description === null || description === void 0 ? void 0 : description.replace('®', '<sup>®</sup>'),
                                    } }))] }))] }), children, closeButton && (_jsx(Button, { styleType: 'primary', onClick: setShowModal, width: "335px", margin: "auto", children: t.close || 'Close' }))] }) }));
};
export default memo(ModalModule);
