"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AgvNodeService = void 0;
const agv_node_config_1 = require("./agv-node-config");
const agv_node_1 = require("./agv-node");
class AgvNodeService {
  constructor() {
    this.programNodeConfig = new agv_node_config_1.AgvNodeConfig();
    this.funcMap = new Map();
  }
  loadFromXml(dataModel) {
    const node = new agv_node_1.AgvNode(this.programModel);
    node.setDataModel(dataModel);
    return node;
  }
  setProgramModel(programModel) {
    this.programModel = programModel;
  }
  getProgramNodeConfig() {
    return this.programNodeConfig;
  }
  getRpcMap() {
    return this.funcMap;
  }
  createNode() {
    return {
      nodeId: this.programNodeConfig.id,
      node: new agv_node_1.AgvNode(this.programModel),
      children: []
    };
  }
  cloneNode(node) {
    return new agv_node_1.AgvNode(this.programModel).cloneNode(node);
  }
}
exports.AgvNodeService = AgvNodeService;
//# sourceMappingURL=agv-node-service.js.map