import { NodeService } from './components/node';
import { EdgeService } from './components/edge';
import { GroupService } from './components/group';
import { CanvasService } from './components/canvas';
import { registerNode } from '../registerNode';

/** 默认支持修改标签和重命名功能 */
export default function controlMapService(controlMap: any) {
  // 注册自定义组件
  registerNode.map((node) => {
    controlMap.set(`${node.name}`, node.service);
  });
  controlMap.set('node-service', NodeService);
  controlMap.set('edge-service', EdgeService);
  controlMap.set('group-service', GroupService);
  controlMap.set('canvas-service', CanvasService);
  return controlMap;
}
