/*
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/maybe","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","./AnalysisView3D","./Slice/SliceController","./Slice/SliceTool","./Slice/SliceVisualization","../../analysis/analysisViewUtils"],(function(i,e,s,t,a,o,l,n,r,y,c,u,p,h){"use strict";let d=function(e){function s(i){var s;return(s=e.call(this,i)||this).type="slice-view-3d",s.analysis=null,s.tool=null,s.analysisVisualization=null,s.analysisController=null,s.plane=null,s.active=!0,s.showGrid=!1,s}i._inheritsLoose(s,e);var a=s.prototype;return a.initialize=function(){this.analysisVisualization=new p.SliceVisualization({view:this.view,analysis:this.analysis,analysisViewData:this}),this.analysisController=new c.SliceController({view:this.view,analysis:this.analysis,analysisViewData:this}),this.own(h.connectAnalysisViewToTool(this,u))},a.destroy=function(){h.removeAnalysisViewTool(this),this.analysisVisualization=t.destroyMaybe(this.analysisVisualization),this.analysisController=t.destroyMaybe(this.analysisController)},a.when=function(){var e=i._asyncToGenerator((function*(){return yield this.analysisVisualization.whenReady(),yield this.analysisController.whenReady(),this}));function s(){return e.apply(this,arguments)}return s}(),i._createClass(s,[{key:"editable",get:function(){return!this.analysisVisualization.preview},set:function(i){this.analysisVisualization.preview=!i}},{key:"testData",get:function(){return{visualization:this.analysisVisualization,controller:this.analysisController,tool:t.unwrap(this.tool)}}}]),s}(y.AnalysisView3D(s));e.__decorate([a.property({readOnly:!0})],d.prototype,"type",void 0),e.__decorate([a.property({constructOnly:!0,nonNullable:!0})],d.prototype,"analysis",void 0),e.__decorate([a.property()],d.prototype,"tool",void 0),e.__decorate([a.property()],d.prototype,"plane",void 0),e.__decorate([a.property()],d.prototype,"active",void 0),e.__decorate([a.property({aliasOf:"analysisVisualization.showGrid"})],d.prototype,"showGrid",void 0),e.__decorate([a.property()],d.prototype,"editable",null),d=e.__decorate([r.subclass("esri.views.3d.analysis.SliceAnalysisView3D")],d);return d}));
