"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ForceToBoardNodeService = void 0;
const force_to_board_node_config_1 = require("./force-to-board-node-config");
const force_to_board_node_1 = require("./force-to-board-node");
class ForceToBoardNodeService {
  constructor() {
    this.programNodeConfig = new force_to_board_node_config_1.ForceToBoardNodeConfig();
    this.funcMap = new Map();
  }
  loadFromXml(dataModel) {
    const node = new force_to_board_node_1.ForceToBoardNode(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 force_to_board_node_1.ForceToBoardNode(this.programModel),
      children: []
    };
  }
  cloneNode(node) {
    return new force_to_board_node_1.ForceToBoardNode(this.programModel).cloneNode(node);
  }
}
exports.ForceToBoardNodeService = ForceToBoardNodeService;
//# sourceMappingURL=force-to-board-node-service.js.map