/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as e}from"tslib";import{clone as r}from"../../core/lang.js";import{lengthUnitsJSONMap as t,areaUnitsJSONMap as o}from"../../core/units.js";import{property as i,subclass as s}from"../../core/accessorSupport/decorators.js";import{getJsonType as a}from"../../geometry/support/jsonTypeUtils.js";import{geometryTypes as p}from"../../geometry/support/typeUtils.js";import m from"./BaseImageMeasureParameters.js";import{measureOperationJSONMap as n}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="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,r,t){null!=e&&(r.geometryType=a(e),r[t]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new y(r({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};e([i({types:p,json:{name:"fromGeometry",read:!0,write:!0}})],u.prototype,"geometry",void 0),e([l("geometry")],u.prototype,"writeGeometry",null),e([i({type:n.apiValues,json:{write:n.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,"areaUnit",void 0),u=y=e([s("esri.rest.support.ImageAreaParameters")],u);export{u as default};
