import { RectNode, RectNodeModel } from "@logicflow/core"
import { colors } from "./../config";

class StartTaskModel extends RectNodeModel {
  initNodeData(data) {
    super.initNodeData(data);
    this.height = 30
  }
  getNodeStyle() {
    const style = super.getNodeStyle();
    style.fill = colors.start.background;
    style.stroke = colors.start.border;
    style.strokeWidth = 1
    return style
  }
  getDefaultAnchor() {
    const { x, y, id } = this;
    return [
      {
        x: x,
        y: y + 15,
        name: 'bottom',
        id: `${id}_0`
      },
      {
        x: x,
        y: y - 15,
        name: 'top',
        id: `${id}_0`
      },
    ]
  }
}

class startTaskView extends RectNode {
 }


export default {
  type: 'StartTask',
  model: StartTaskModel,
  view: startTaskView
}
