/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import e from"../../Graphic.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o,subclass as s}from"../../core/accessorSupport/decorators.js";import{typeKebabDictionary as i}from"../../geometry/support/typeUtils.js";import{reader as p}from"../../core/accessorSupport/decorators/reader.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";let u=class extends r{constructor(t){super(t),this.displayFieldName=null,this.feature=null,this.foundFieldName=null,this.layerId=null,this.layerName=null,this.value=void 0}readFeature(t,r){const o={attributes:{}};return r.attributes&&(o.attributes=r.attributes),r.geometry&&(o.geometry=r.geometry),e.fromJSON(o)}writeFeature(t,e){if(!t)return;const{attributes:r,geometry:o}=t;r&&(e.attributes={...r}),null!=o&&(e.geometry=o.toJSON(),e.geometryType=i.toJSON(o.type))}};t([o({type:String,json:{write:!0}})],u.prototype,"displayFieldName",void 0),t([o({type:e})],u.prototype,"feature",void 0),t([p("feature",["attributes","geometry"])],u.prototype,"readFeature",null),t([a("feature")],u.prototype,"writeFeature",null),t([o({type:String,json:{write:!0}})],u.prototype,"foundFieldName",void 0),t([o({type:Number,json:{write:!0}})],u.prototype,"layerId",void 0),t([o({type:String,json:{write:!0}})],u.prototype,"layerName",void 0),t([o({json:{write:!0}})],u.prototype,"value",void 0),u=t([s("esri.rest.support.FindResult")],u);const l=u;export{l as default};
