import { jsx as _jsx } from "react/jsx-runtime";
import { SimpleDialog } from "../../dialog/simpleDialog";
import { useModal } from "../../modal";
import { create } from "../../modal/modalHelper";
import { modalActions } from "../../modal/modalContext";
import { DialogBody } from "../../dialog";
const Dialog = create((props)=>{
    const { visible, hide, resolve, reject, onOpenChange } = useModal();
    return /*#__PURE__*/ _jsx(SimpleDialog, {
        open: visible,
        title: props.title,
        closable: true,
        onOpenChange: onOpenChange,
        children: /*#__PURE__*/ _jsx(DialogBody, {
            children: /*#__PURE__*/ _jsx("div", {
                className: "orderly-py-5 orderly-text-[12px]",
                children: props.content
            })
        })
    });
});
export const dialog = (props)=>{
    return modalActions.show(Dialog, props);
};

//# sourceMappingURL=dialog.js.map