"use strict";

exports.__esModule = true;
exports["default"] = void 0;
var _mobx = require("mobx");
var Detection = exports["default"] = /*#__PURE__*/function () {
  function Detection(designer) {
    this.designer = void 0;
    this.hoveredNodePosition = void 0;
    this.selectedNodePosition = void 0;
    (0, _mobx.makeAutoObservable)(this, {
      designer: false
    });
    this.designer = designer;
  }
  var _proto = Detection.prototype;
  _proto.computeHoveredPosition = function computeHoveredPosition(nodeId) {
    if (nodeId) {
      this.hoveredNodePosition = this.designer.getNodeRect(nodeId);
    } else {
      this.hoveredNodePosition = undefined;
    }
  };
  _proto.computeSelectedPosition = function computeSelectedPosition(nodeId) {
    if (nodeId) {
      this.selectedNodePosition = this.designer.getNodeRect(nodeId);
    } else {
      this.selectedNodePosition = undefined;
    }
  };
  return Detection;
}();