/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
let t=-1383920;function e(t,e=""){""!==e&&t.reasonsIncluded.add(e)}function a(t){return"delete"===t.type}function r(t){return"modify"===t.type}function s(t){return"add"===t.type}function n(t){return"addAttachment"===t.type}function c(t){return"deleteAttachment"===t.type}class i{constructor(t){this.reasonsIncluded=new Set,this.graphic=t.graphic.clone(),this.layer=t.layer,e(this,t.reason)}get featureChangeId(){return`${this.layer.id}:${this.graphic.attributes[this.layer.objectIdField].toString()}`}}class h extends i{constructor(t){super(t),this.type="delete"}}class d extends i{constructor(e){super(e),this.type="add";const a=t--;e.graphic.attributes[e.layer.objectIdField]=a,this.graphic.attributes[e.layer.objectIdField]=a}}class o extends i{constructor(t){super(t),this.type="modify",this.revertGraphic=t.originalGraphic.clone()}}class u extends i{constructor(t){super(t),this.type="addAttachment",this.attachmentData=null,this.attachmentData=t.attachmentData}}class l extends i{constructor(t){super(t),this.type="deleteAttachment",this.attachment=t.attachment}get featureChangeId(){return`${this.layer.id}:attach:${this.attachment.id.toString()}`}}export{u as ApplySetAddAttachmentItem,d as ApplySetAddItem,l as ApplySetDeleteAttachmentItem,h as ApplySetDeleteItem,i as ApplySetItemBase,o as ApplySetModifyItem,n as isAddAttachmentItem,s as isAddItem,c as isDeleteAttachmentItem,a as isDeleteItem,r as isModifyItem};
