import _extends from "@babel/runtime/helpers/extends";
/**
 * 规则预制(加载)节点，主要用于万能按钮加载完页面后执行
 * 返回false则终止执行
 * 
 */
import { EXPAND_ICON } from "../icons";
import { FlowEvent } from "../type";
export var rulePreNode = {
  options: {
    style: {
      fill: '#3a5ec2',
      radius: 8,
      lineWidth: 1,
      stroke: '#08a5ee',
      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 keyShape = group.addShape('rect', {
      attrs: _extends({
        x: 0,
        y: 0
      }, styles)
    });
    group.addShape('marker', {
      attrs: {
        x: 0,
        y: h / 2 + 7,
        r: 6,
        stroke: '#73d13d',
        cursor: 'pointer',
        symbol: EXPAND_ICON
      },
      // must be assigned in G6 3.3 and later versions. it can be any string you want, but should be unique in a custom item type
      name: FlowEvent.addItem
    });
    return keyShape;
  }
};