/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/Accessor","../../core/HandleOwner","../../core/maybe","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass"],(function(e,t,r,i,o,s,n,u,a,d,c){"use strict";function l(e){return s.isNone(e)?null:JSON.stringify(e)}e.Edits=function(e){function r(t){var r;return(r=e.call(this,t)||this)._baselineAttributesJSON=null,r._baselineGeometryJSON=null,r.feature=null,r}t._inheritsLoose(r,e);var i=r.prototype;return i.trackChanges=function(){this.feature&&(this._baselineAttributesJSON=l(this.feature.attributes),this._baselineGeometryJSON=l(this.feature.geometry),this.notifyChange("attributesModified"),this.notifyChange("geometryModified"))},i.updateAttributes=function(e){this.feature.attributes=e,this.notifyChange("attributesModified")},i.updateGeometry=function(e){this.feature.geometry=e,this.notifyChange("geometryModified")},t._createClass(r,[{key:"attributesModified",get:function(){const{_baselineAttributesJSON:e,feature:t}=this;return!(!t||e===l(t.attributes))}},{key:"geometryModified",get:function(){const{_baselineGeometryJSON:e,feature:t}=this;return!(!t||e===l(t.geometry))}},{key:"modified",get:function(){return this.attributesModified||this.geometryModified}}]),r}(o.HandleOwnerMixin(i)),r.__decorate([n.property()],e.Edits.prototype,"attributesModified",null),r.__decorate([n.property()],e.Edits.prototype,"feature",void 0),r.__decorate([n.property()],e.Edits.prototype,"geometryModified",null),r.__decorate([n.property()],e.Edits.prototype,"modified",null),e.Edits=r.__decorate([c.subclass("esri.widgets.Editor.Edits")],e.Edits),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
