/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
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 p}from"../../geometry/support/typeUtils.js";import{reader as i}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.layerId=null,this.layerName=null}readFeature(t,r){return e.fromJSON({attributes:{...r.attributes},geometry:{...r.geometry}})}writeFeature(t,e){if(!t)return;const{attributes:r,geometry:o}=t;r&&(e.attributes={...r}),null!=o&&(e.geometry=o.toJSON(),e.geometryType=p.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([i("feature",["attributes","geometry"])],u.prototype,"readFeature",null),t([a("feature")],u.prototype,"writeFeature",null),t([o({type:Number,json:{write:!0}})],u.prototype,"layerId",void 0),t([o({type:String,json:{write:!0}})],u.prototype,"layerName",void 0),u=t([s("esri.rest.support.IdentifyResult")],u);const l=u;export{l as default};
