/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as o,subclass as n}from"../../core/accessorSupport/decorators.js";import r from"../../rest/networks/support/TelecomNetworkElement.js";import{reader as i}from"../../core/accessorSupport/decorators/reader.js";import{writer as d}from"../../core/accessorSupport/decorators/writer.js";let c=class extends t{constructor(e){super(e),this.edgeElement=null,this.junctionElement=null}readEdgeElement(e,t){return new r({networkSourceId:t.edgeSourceId,globalId:t.edgeGlobalId,objectId:t.edgeObjectId,positionFrom:t.edgePositionFrom,positionTo:t.edgePositionTo,firstUnit:t.edgeFirstUnit,lastUnit:t.edgeLastUnit})}writeEdgeElement(e,t){t.edgeSourceId=e.networkSourceId,t.edgeGlobalId=e.globalId,t.edgeObjectId=e.objectId,t.edgePositionFrom=e.positionFrom,t.edgePositionTo=e.positionTo,t.edgeFirstUnit=e.firstUnit,t.edgeLastUnit=e.lastUnit}readJunctionElement(e,t){return new r({networkSourceId:t.junctionSourceId,globalId:t.junctionGlobalId,objectId:t.junctionObjectId,firstUnit:t.junctionFirstUnit,lastUnit:t.junctionLastUnit})}writeJunctionElement(e,t){t.junctionSourceId=e.networkSourceId,t.junctionGlobalId=e.globalId,t.junctionObjectId=e.objectId,t.junctionFirstUnit=e.firstUnit,t.junctionLastUnit=e.lastUnit}};e([o({type:r,json:{read:{source:["edgeSourceId","edgeGlobalId","edgeObjectId","edgePositionFrom","edgePositionTo","edgeFirstUnit","edgeLastUnit"]},write:!0}})],c.prototype,"edgeElement",void 0),e([i("edgeElement")],c.prototype,"readEdgeElement",null),e([d("edgeElement")],c.prototype,"writeEdgeElement",null),e([o({type:r,json:{read:{source:["junctionSourceId","junctionGlobalId","junctionObjectId","junctionFirstUnit","junctionLastUnit"]},write:!0}})],c.prototype,"junctionElement",void 0),e([i("junctionElement")],c.prototype,"readJunctionElement",null),e([d("junctionElement")],c.prototype,"writeJunctionElement",null),c=e([n("esri.networks.support.CircuitPathConnectivityElement")],c);const s=c;export{s as default};
