import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { Modal } from "../Modal";
import { Button } from "../../../components/atoms/Button";
import { Text } from "../../../components/atoms/Text";
export const Dialog = ({ isOpen, onClose, onConfirm, title, message, confirmText = "Confirm", cancelText = "Cancel", variant = "default", }) => {
    const handleConfirm = () => {
        if (onConfirm) {
            onConfirm();
        }
        onClose();
    };
    return (_jsx(Modal, { isOpen: isOpen, onClose: onClose, title: title, size: "sm", footer: _jsxs(_Fragment, { children: [_jsx(Button, { variant: "outline", onClick: onClose, children: cancelText }), _jsx(Button, { variant: variant === "danger" ? "danger" : "primary", onClick: handleConfirm, children: confirmText })] }), children: _jsx(Text, { variant: "body", children: message }) }));
};
export default Dialog;
