/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../chunks/_rollupPluginBabelHelpers","../chunks/tslib.es6","../core/Accessor","../core/Clonable","../core/Identifiable","../core/JSONSupport","../core/maybe","../core/accessorSupport/decorators/property","../core/arrayUtils","../core/has","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/subclass"],(function(e,t,r,o,s,i,n,a,p,c,l,y){"use strict";let d=0,u=function(t){function r(e){var r;return(r=t.call(this,e)||this).id=`${Date.now().toString(16)}-analysis-${d++}`,r.title=null,r}return e._inheritsLoose(r,t),e._createClass(r,[{key:"parent",get:function(){return this._get("parent")},set:function(e){const t=this.parent;if(n.isSome(t))switch(t.type){case"line-of-sight":t.removeAnalysis(this);break;case"2d":case"3d":t.analyses.includes(this)&&t.analyses.remove(this)}this._set("parent",e)}},{key:"isEditable",get:function(){return this.requiredPropertiesForEditing.every(n.isSome)}}]),r}(i.JSONSupportMixin(o.ClonableMixin(s.IdentifiableMixin(r))));t.__decorate([a.property({type:String,constructOnly:!0,clonable:!1})],u.prototype,"id",void 0),t.__decorate([a.property({type:String})],u.prototype,"title",void 0),t.__decorate([a.property({constructOnly:!0})],u.prototype,"type",void 0),t.__decorate([a.property({clonable:!1,value:null})],u.prototype,"parent",null),t.__decorate([a.property({readOnly:!0})],u.prototype,"extent",void 0),t.__decorate([a.property({readOnly:!0})],u.prototype,"isEditable",null),t.__decorate([a.property({readOnly:!0})],u.prototype,"requiredPropertiesForEditing",void 0),t.__decorate([a.property({readOnly:!0})],u.prototype,"nonEditableMessage",void 0),u=t.__decorate([y.subclass("esri.analysis.Analysis")],u);return u}));
