/*
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/Error","../../../core/reactiveUtils","../../../core/accessorSupport/decorators/property","../../../core/arrayUtils","../../../core/has","../../../core/accessorSupport/ensureType","../../../core/accessorSupport/decorators/subclass","../../../layers/graphics/controllers/StreamController","../../../rest/support/Query","./FeatureLikeLayerView3D","./LayerView3D","../webgl-engine/lib/basicInterfaces","../../layers/LayerView","../../layers/StreamLayerView"],(function(e,r,t,o,a,n,s,i,c,l,u,p,y,d,h,_){"use strict";let f=function(r){function a(){var e;return(e=r.apply(this,arguments)||this).type="stream-3d",e.updatePolicy=d.UpdatePolicy.ASYNC,e.hasZ=!0,e.hasM=!1,e}e._inheritsLoose(a,r);var n=a.prototype;return n.initialize=function(){this.handles.add(o.watch((()=>this.suspended),(e=>{this.controller&&(e?this.controller.pauseStream():this.controller.resumeStream())})))},n.createQuery=function(){return new u({outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference})},n.queryLatestObservations=function(e,r){return this.queryEngine.executeQueryForLatestObservations(this._ensureQuery(e),null==r?void 0:r.signal)},n.createController=function(){return new l.StreamController({layer:this.layer,layerView:this})},n.beforeSetController=function(){},e._createClass(a,[{key:"connectionError",get:function(){const e=this.get("controller.connection.errorString");if(e)return new t("stream-controller",e)}}]),a}(_(p.FeatureLikeLayerView3D(y.LayerView3D(h))));r.__decorate([a.property({readOnly:!0})],f.prototype,"updatePolicy",void 0),r.__decorate([a.property({readOnly:!0})],f.prototype,"connectionError",null),r.__decorate([a.property()],f.prototype,"controller",void 0),r.__decorate([a.property({readOnly:!0})],f.prototype,"hasZ",void 0),r.__decorate([a.property({readOnly:!0})],f.prototype,"hasM",void 0),f=r.__decorate([c.subclass("esri.views.3d.layers.StreamLayerView3D")],f);return f}));
