import G6 from '@antv/g6';
G6.registerNode('skinshipNode', {
  drawShape: function drawShape(cfg, group) {
    // 更改参数类型
    var rect = group === null || group === void 0 ? void 0 : group.addShape('rect', {
      attrs: {
        x: -75,
        y: -25,
        width: 150,
        height: 50,
        radius: 5,
        fill: '#fff',
        lineWidth: 1,
        shadowColor: 'rgba(0, 0, 0, 0.1)',
        shadowBlur: 4,
        shadowOffsetX: 0,
        shadowOffsetY: 2
      },
      name: 'rect-shape'
    });
    group === null || group === void 0 ? void 0 : group.addShape('rect', {
      attrs: {
        stroke: '#165DFF',
        fill: '#165DFF',
        x: 70,
        y: -25,
        width: 5,
        height: 50,
        lineWidth: 1,
        radius: [0, 5, 5, 0]
      },
      name: 'rect-shape'
    });
    if (cfg === null || cfg === void 0 ? void 0 : cfg.name) {
      group === null || group === void 0 ? void 0 : group.addShape('text', {
        attrs: {
          text: cfg.name || 'xxx',
          x: 0,
          y: 0,
          fill: '#00287E',
          fontSize: 14,
          textAlign: 'center',
          textBaseline: 'middle'
        },
        name: 'text-shape'
      });
    }
    // 左右两边的小圆
    group === null || group === void 0 ? void 0 : group.addShape('circle', {
      attrs: {
        x: -75,
        y: 0,
        r: 5,
        fill: '#fff',
        stroke: '#165DFF',
        lineWidth: 1
      },
      name: 'circle-shape'
    });
    group === null || group === void 0 ? void 0 : group.addShape('circle', {
      attrs: {
        x: 75,
        y: 0,
        r: 5,
        fill: '#fff',
        stroke: '#165DFF',
        lineWidth: 1
      },
      name: 'circle-shape'
    });
    return rect;
  }
});