
import { register } from "@antv/x6-react-shape";
import { Graph, Node } from "@antv/x6";
import { defaultData } from "../../config/data";

const component = ({ node, graph }: { node: Node, graph: Graph }) => {

  return (
    <>
      <div
        className="relative text-0 w-full h-0 border-solid border-1 border-solid-color"
      >
       <span className="absolute w-12px left-6px rotate--90 top--25px text-12px">阶段</span>
      </div>
    </>
  );
};

register({
  shape: "custom-react-horizontalSeparator",
  width: 270,
  height: 2,
  effect: ["data"],
  component: component,
});

const horizontalSeparator = {
  name: "分隔符(需拖动到垂直泳池上)",
  icon: require("./image/horizontalSeparator.png"),
  node: {
    shape: "custom-react-horizontalSeparator",
    data: {
      label: "",
      // 分割符
      isSeparator: true,
      // 分割方向
      separatorDiration: "horizontal",
      // 忽略拖动
      ignoreDrag: true,
      // 不用创建
      noCreate: true,
    },
  },
};

export default horizontalSeparator;
