/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as t,subclass as r}from"../../core/accessorSupport/decorators.js";import{ensureClass as p}from"../../core/accessorSupport/ensureType.js";import s from"../../geometry/Point.js";import i from"../../geometry/SpatialReference.js";import{apiKey as a}from"./commonProperties.js";import{geocodePreferredLabelJsonMap as n,geocodeFeatureTypeJsonMap as l}from"./geocodeEnums.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";import{enumeration as c}from"../../core/accessorSupport/decorators/enumeration.js";var m;let y=m=class extends o{constructor(e){super(e),this.apiKey=null,this.featureTypes=null,this.forStorage=null,this.language=null,this.location=null,this.locationType=null,this.outFields=null,this.outSpatialReference=null,this.preferredLabelValues=null,this.returnInputLocation=null}writeFeatureTypes(e,o){e?.length&&(o.featureTypes=e.map(e=>l.toJSON(e)))}writeLocation(e,o){o.location=e?.clone().normalize().toJSON()}static from(e){return p(m,e)}};e([t(a)],y.prototype,"apiKey",void 0),e([t({type:[["distance-marker","locality","poi","point-address","postal","street-address","street-intersection","street-name","sub-address"]],json:{write:!0}})],y.prototype,"featureTypes",void 0),e([u("featureTypes")],y.prototype,"writeFeatureTypes",null),e([t({type:Boolean,json:{write:!0}})],y.prototype,"forStorage",void 0),e([t({type:String,json:{name:"langCode",write:!0}})],y.prototype,"language",void 0),e([t({type:s,json:{write:!0}})],y.prototype,"location",void 0),e([u("location")],y.prototype,"writeLocation",null),e([t({type:["street","rooftop"],json:{write:!0}})],y.prototype,"locationType",void 0),e([t({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),e([t({type:i,json:{name:"outSR",write:!0}})],y.prototype,"outSpatialReference",void 0),e([c(n)],y.prototype,"preferredLabelValues",void 0),e([t({type:Boolean,json:{write:!0}})],y.prototype,"returnInputLocation",void 0),y=m=e([r("esri.rest.support.LocationToAddressParameters")],y);const d=y;export{d as default};
