"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.eventFlowNode = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _icons = require("../icons");
var _type = require("../type");
/**
 * 对接其他事件流节点，用于在当前事件流之前其他事件流节点
 * 只能作为末尾节点
 */

var eventFlowNode = exports.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: (0, _extends2["default"])({
        x: 0,
        y: 0
      }, styles)
    });
    group.addShape("marker", {
      attrs: {
        x: w / 2 - 20,
        y: 0,
        r: 6,
        stroke: "#ff4d4f",
        cursor: "pointer",
        symbol: _icons.COLLAPSE_ICON
      },
      name: _type.FlowEvent.removeItem
    });
    return keyShape;
  }
};