import React, { useCallback } from 'react';
import { Button, ModalWrapper } from "../../modules";
import { BUTTON_PULSE_TYPE, BUTTON_SIZE } from "../../constants";
import { FONT_VARIANTS } from "../../globalStyled";
import { DeleteBlockText, DeleteModalDiv } from './styled';
export const DeleteModal = ({ onClose, onConfirm, text, title = 'Вы уверены?', windowLevel, visible, }) => {
    const { secondary } = BUTTON_PULSE_TYPE;
    const { body2Regular } = FONT_VARIANTS;
    const actionBar = useCallback(() => (React.createElement(React.Fragment, null,
        React.createElement(Button, { type: secondary, onClick: onClose, size: BUTTON_SIZE.s }, "\u043E\u0442\u043C\u0435\u043D\u0430"),
        React.createElement(Button, { size: BUTTON_SIZE.s, onClick: () => {
                onConfirm();
                onClose();
            } }, "\u0434\u0430, \u0443\u0434\u0430\u043B\u0438\u0442\u044C"))), []);
    const header = useCallback(() => React.createElement(React.Fragment, null, title), []);
    return (React.createElement(ModalWrapper, { actionBar: actionBar, header: header, windowLevel: windowLevel, visible: visible, onClose: onClose },
        React.createElement(DeleteModalDiv, null, text && React.createElement(DeleteBlockText, { variant: body2Regular }, text))));
};
