/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../core/maybe"],(function(e,t){"use strict";function r(e,t){return l(e)===l(t)}function l(e){if(t.isNone(e))return null;const r=null!=e.layer?e.layer.id:"";let l=null;return l=null!=e.objectId?e.objectId:null!=e.layer&&"objectIdField"in e.layer&&null!=e.layer.objectIdField&&null!=e.attributes?e.attributes[e.layer.objectIdField]:e.uid,null==l?null:`o-${r}-${l}`}const u={json:{write:{writer:n,target:{"feature.layerId":{type:[Number,String]},"feature.objectId":{type:[Number,String]}}},origins:{"web-scene":{read:i}}}};function n(e,r){var l;t.isNone(e)||null==(null==(l=e.layer)?void 0:l.objectIdField)||null==e.attributes||(r.feature={layerId:e.layer.id,objectId:e.attributes[e.layer.objectIdField]})}function i(e){if(null!=e.layerId&&null!=e.objectId)return{uid:null,layer:{id:e.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:e.objectId}}}e.featureReferenceEquals=r,e.featureReferenceProperty=u,e.getFeatureId=l,e.readFeatureReference=i,e.writeFeatureReference=n,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
