"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.AlignRailwayNodeService = void 0;
const alignrailway_node_config_1 = require("./alignrailway-node-config");
const alignrailway_node_1 = require("./alignrailway-node");
class AlignRailwayNodeService {
  constructor() {
    this.programNodeConfig = new alignrailway_node_config_1.AlignRailwayNodeConfig();
    this.funcMap = new Map();
  }
  loadFromXml(dataModel) {
    const node = new alignrailway_node_1.AlignRailwayNode(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 alignrailway_node_1.AlignRailwayNode(this.programModel),
      children: []
    };
  }
  cloneNode(node) {
    return new alignrailway_node_1.AlignRailwayNode(this.programModel).cloneNode(node);
  }
}
exports.AlignRailwayNodeService = AlignRailwayNodeService;
//# sourceMappingURL=alignrailway-node-service.js.map