import { MindElixirInstance } from "mind-elixir";
import { useRef, useEffect } from "react";
import MindElixir from "mind-elixir";

export default function MindEditor() {
    const me = useRef<MindElixirInstance>();
    useEffect(() => {
        const instance = new MindElixir({
            el: "#map",
            direction: MindElixir.SIDE,
            draggable: true, // default true
            contextMenu: true, // default true
            toolBar: true, // default true
            nodeMenu: true, // default true
            keypress: true // default true

        });
        // instance.install(NodeMenu);
        instance.init(MindElixir.new("新主题"));
        me.current = instance;
    }, []);
    return <div >

        <div id="map" style={{ width: "100%" }} />
    </div>
}
