/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as i}from"tslib";import s from"../../../../core/Accessor.js";import{destroyHandle as t}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{mapCollection as e}from"../../../../core/mapCollectionUtils.js";import{watch as o,initial as a}from"../../../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../../../core/accessorSupport/decorators.js";import n from"./ViewshedSubVisualization.js";let c=class extends s{get visible(){return this.analysisViewData.visible}constructor(i){super(i)}initialize(){const i=this.analysisViewData,s=e(()=>this.analysisViewData.viewshedComputedDataHandles,({viewshedComputedData:s})=>{const t=new n({view:this.view,viewshedComputedData:s,analysisViewData:i,isDecoration:this.isDecoration});return{visualization:t,remove:()=>t.destroy()}});this._subVisualizations=s,this.addHandles([t(s),o(()=>this.visible,i=>this._subVisualizations.forEach(({visualization:s})=>s.visible=i),a)])}get test(){}};i([r({constructOnly:!0})],c.prototype,"analysisViewData",void 0),i([r({constructOnly:!0,nonNullable:!0})],c.prototype,"view",void 0),i([r({constructOnly:!0})],c.prototype,"isDecoration",void 0),i([r()],c.prototype,"visible",null),c=i([l("esri.views.3d.analysis.Viewshed.ViewshedVisualization")],c);export{c as ViewshedVisualization};
