@enumura/chatbot-flow-editor
Version:
Visual chatbot flow editor - Development tool for creating conversational flows
49 lines (48 loc) • 1.89 kB
JavaScript
import { j as jsxRuntimeExports, B as Button } from "./index-BV-DVq2p.js";
import { S as SimpleDialog } from "./Dialog-C2qkkdLN.js";
function DeleteNodeDialog({
open,
onClose,
onConfirm,
nodeTitle,
nodeId
}) {
const handleConfirm = () => {
onConfirm();
onClose();
};
return /* @__PURE__ */ jsxRuntimeExports.jsx(
SimpleDialog,
{
open,
onClose,
title: "Delete Node",
footer: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: onClose, children: "Cancel" }),
/* @__PURE__ */ jsxRuntimeExports.jsx(
Button,
{
variant: "outline",
onClick: handleConfirm,
className: "bg-red-50 hover:bg-red-100 border-red-200 text-red-800",
children: "Delete"
}
)
] }),
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-4", children: [
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-gray-700", children: "Are you sure you want to delete this node?" }),
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "bg-gray-50 p-3 rounded border", children: [
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-sm text-gray-600", children: [
"Node ",
nodeId
] }),
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium text-gray-900", children: nodeTitle })
] }),
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "bg-gray-50 border border-gray-200 p-3 rounded", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-gray-700", children: "This action cannot be undone." }) })
] })
}
);
}
export {
DeleteNodeDialog as default
};