/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{property as o,subclass as r}from"../../core/accessorSupport/decorators.js";import{getJsonType as s}from"../../geometry/support/jsonTypeUtils.js";import{geometryTypes as i}from"../../geometry/support/typeUtils.js";import{geometryOperationLengthUnitKebabDict as n}from"./geometryOperationLengthUnit.js";let p=class extends e{constructor(t){super(t),this.geometry1=null,this.geometry2=null,this.distanceUnit=null,this.geodesic=null}toJSON(){const t={},e=this.geometry1;e&&(t.geometry1=JSON.stringify({geometryType:s(e),geometry:e}),t.sr=JSON.stringify(this.geometry1.spatialReference.toJSON()));const o=this.geometry2;return o&&(t.geometry2=JSON.stringify({geometryType:s(o),geometry:o})),this.distanceUnit&&(t.distanceUnit=n.toJSON(this.distanceUnit)),this.geodesic&&(t.geodesic=this.geodesic),t}};t([o({types:i,json:{write:!0}})],p.prototype,"geometry1",void 0),t([o({types:i,json:{write:!0}})],p.prototype,"geometry2",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"distanceUnit",void 0),t([o({type:Boolean,json:{write:!0}})],p.prototype,"geodesic",void 0),p=t([r("esri.rest.support.DistanceParameters")],p);const y=p;export{y as default};
