/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{clone as r}from"../../core/lang.js";import{lengthUnitsJSONMap as t,angleUnitsJSONMap as o}from"../../core/units.js";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";import a from"../../geometry/Point.js";import{getJsonType as n}from"../../geometry/support/jsonTypeUtils.js";import m from"./BaseImageMeasureParameters.js";import{measureOperationJSONMap as p}from"./imageMeasureUtils.js";import{writer as l}from"../../core/accessorSupport/decorators/writer.js";var y;let u=y=class extends m{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,r,t){null!=e&&(r.geometryType=n(e),r[t]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new y(r({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};e([i({type:a,json:{read:!0,write:!0}})],u.prototype,"fromGeometry",void 0),e([l("fromGeometry")],u.prototype,"writeFromGeometry",null),e([i({type:a,json:{read:!0,write:!0}})],u.prototype,"toGeometry",void 0),e([i({type:p.apiValues,json:{write:p.write}})],u.prototype,"measureOperation",null),e([i({json:{read:!0}})],u.prototype,"is3D",void 0),e([i({type:String,json:{read:t.read,write:t.write}})],u.prototype,"linearUnit",void 0),e([i({type:String,json:{read:o.read,write:o.write}})],u.prototype,"angularUnit",void 0),u=y=e([s("esri.rest.support.ImageDistanceParameters")],u);export{u as default};
