import _extends from "@babel/runtime/helpers/extends";
/**
 * 对接其他事件流节点，用于在当前事件流之前其他事件流节点
 * 只能作为末尾节点
 */
import { COLLAPSE_ICON } from "../icons";
import { FlowEvent } from "../type";
export var eventFlowNode = {
  options: {
    style: {
      fill: "#e6fa09",
      stroke: "#90f468",
      radius: 8,
      lineWidth: 1,
      fillOpacity: "0.95"
    },
    stateStyles: {
      hover: {},
      selected: {}
    },
    labelCfg: {
      style: {
        fill: "#000000",
        fontSize: 14,
        fontWeight: 400,
        fillOpacity: "0.7"
      }
    },
    size: [120, 40]
  },
  drawShape: function drawShape(cfg, group) {
    var styles = this.getShapeStyle(cfg);
    var h = styles.height;
    var w = styles.width;
    var keyShape = group.addShape("rect", {
      attrs: _extends({
        x: 0,
        y: 0
      }, styles)
    });
    group.addShape("marker", {
      attrs: {
        x: w / 2 - 20,
        y: 0,
        r: 6,
        stroke: "#ff4d4f",
        cursor: "pointer",
        symbol: COLLAPSE_ICON
      },
      name: FlowEvent.removeItem
    });
    return keyShape;
  }
};