/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as e}from"tslib";import s from"./support/AnalysisOriginWebScene.js";import t from"../core/Accessor.js";import{ClonableMixin as r}from"../core/Clonable.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import{JSONSupportMixin as i}from"../core/JSONSupport.js";import{property as n,subclass as a}from"../core/accessorSupport/decorators.js";let p=0,l=class extends(i(r(o(t)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${p++}`,this.origin=null}get parent(){return this._get("parent")}set parent(e){const s=this.parent;if(null!=s)switch(s.type){case"line-of-sight":case"dimension":case"viewshed":s.releaseAnalysis(this);break;case"2d":case"3d":s.analyses.includes(this)&&s.analyses.remove(this)}this._set("parent",e)}equals(e){return this.type===e.type}};e([n({type:String,constructOnly:!0,clonable:!1})],l.prototype,"id",void 0),e([n({clonable:!1,value:null})],l.prototype,"parent",null),e([n({types:{key:"type",base:null,typeMap:{"web-scene":s}}})],l.prototype,"origin",void 0),l=e([a("esri.analysis.Analysis")],l);export{l as default};
