"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = void 0;
var _dec, _class, _react = _interopRequireDefault(require("react")),
  _propTypes = _interopRequireDefault(require("prop-types")),
  _amosJsplumb = require("amos-jsplumb"),
  _giotNodeConf = require("./../modelConf/giotNodeConf");

function _interopRequireDefault(e) {
  return e && e.__esModule ? e : {
    default: e
  }
}

function _typeof(e) {
  return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
    return typeof e
  } : function(e) {
    return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  })(e)
}

function _classCallCheck(e, t) {
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function")
}

function _defineProperties(e, t) {
  for (var o = 0; o < t.length; o++) {
    var r = t[o];
    r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r)
  }
}

function _createClass(e, t, o) {
  return t && _defineProperties(e.prototype, t), o && _defineProperties(e, o), e
}

function _inherits(e, t) {
  if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
  e.prototype = Object.create(t && t.prototype, {
    constructor: {
      value: e,
      writable: !0,
      configurable: !0
    }
  }), t && _setPrototypeOf(e, t)
}

function _setPrototypeOf(e, t) {
  return (_setPrototypeOf = Object.setPrototypeOf || function(e, t) {
    return e.__proto__ = t, e
  })(e, t)
}

function _createSuper(o) {
  var r = _isNativeReflectConstruct();
  return function() {
    var e, t = _getPrototypeOf(o);
    return _possibleConstructorReturn(this, r ? (e = _getPrototypeOf(this).constructor, Reflect.construct(t, arguments, e)) : t.apply(this, arguments))
  }
}

function _possibleConstructorReturn(e, t) {
  return !t || "object" !== _typeof(t) && "function" != typeof t ? _assertThisInitialized(e) : t
}

function _assertThisInitialized(e) {
  if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e
}

function _isNativeReflectConstruct() {
  if ("undefined" == typeof Reflect || !Reflect.construct) return !1;
  if (Reflect.construct.sham) return !1;
  if ("function" == typeof Proxy) return !0;
  try {
    return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0
  } catch (e) {
    return !1
  }
}

function _getPrototypeOf(e) {
  return (_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) {
    return e.__proto__ || Object.getPrototypeOf(e)
  })(e)
}
var Anchors = _amosJsplumb.placement.Anchors,
  GiotNode = (_dec = (0, _amosJsplumb.plumbNodeConnect)({
    className: "giot-ele",
    sourceParams: {
      allowLoopback: !1,
      anchor: Anchors.BottomCenter,
      dropOptions: {
        hoverClass: "drag-hover"
      },
      isSource: !0
    },
    endPointParams: [{
      params: _giotNodeConf.sourceEndPoint,
      referenceParams: {
        anchor: Anchors.BottomCenter
      }
    }]
  }))(_class = function() {
    _inherits(t, _react["default"].Component);
    var e = _createSuper(t);

    function t() {
      return _classCallCheck(this, t), e.apply(this, arguments)
    }
    return _createClass(t, [{
      key: "render",
      value: function() {
        this.props.config;
        return _react.default.createElement("div", {
          className: "node-content-wrapper"
        }, _react.default.createElement("div", {
          className: "node-wrapper"
        }))
      }
    }]), t
  }()) || _class;
GiotNode.displayName = "GiotNode", GiotNode.propTypes = {
  config: _propTypes.default.object
};
var _default = GiotNode;
exports.default = GiotNode, module.exports = exports.default;
