import { DndContext } from "@dnd-kit/core";
import { ReactFlowProvider } from "react-flow-renderer";
import Flow from "./Flow";
import Panel from "./Panel";

const FlowEditorComponent = () => {
  return (
    <DndContext>
      <Panel />
      <Flow />
    </DndContext>
  );
};

const FlowEditor = () => {
  return (
    <div className="flow-editor">
      <ReactFlowProvider>
        <FlowEditorComponent />
      </ReactFlowProvider>
    </div>
  );
};

export default FlowEditor;
