text: 'use strict';
  
  import $ from 'jquery';
  import {Node} from 'butterfly-dag';
  // import { Node } from '../../../index';
  
  import './node.less';
  
  class BaseNode extends Node {
    constructor(opts) {
      super(opts);
      this.options = opts;
    }
    draw = (opts) => {
      const container = $('<div class="dagre-group-base-node"></div>')
                      .attr('id', opts.id)
                      .css('top', opts.top + 'px')
                      .css('left', opts.left + 'px')
  
      this._createTypeIcon(container);
      this._createText(container);
  
      return container[0];
    }
    _createTypeIcon(dom = this.dom) {
      const iconContainer = $(`<span class="icon-box ${this.options.className}"></span>`)[0];
      const icon = $(`<i class="iconfont ${this.options.iconType}"></i>`)[0];
  
      iconContainer.append(icon);
      $(dom).append(iconContainer);
    }
  
    _createText(dom = this.dom) {
      $('<span class="text-box"></span>').text(this.options.label).appendTo(dom);
    }
  }
  
  module.exports = BaseNode;
  