/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import e from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as i,subclass as a}from"../../../core/accessorSupport/decorators.js";import{BitmapContainer as s}from"../engine/BitmapContainer.js";import{LayerView2DMixin as o}from"./LayerView2D.js";import n from"./support/ExportStrategy.js";import p from"../../layers/LayerView.js";import{RefreshableLayerView as h}from"../../layers/RefreshableLayerView.js";let m=class extends(h(o(p))){update(t){this._strategy.update(t).catch(t=>{r(t)||e.getLogger(this).error(t)}),this.notifyChange("updating")}attach(){this._bitmapContainer=new s,this.container.addChild(this._bitmapContainer),this._strategy=new n({container:this._bitmapContainer,fetchSource:this.fetchBitmapData.bind(this),requestUpdate:this.requestUpdate.bind(this)})}detach(){this._strategy.destroy(),this._strategy=null,this.container.removeChild(this._bitmapContainer),this._bitmapContainer.removeAllChildren()}viewChange(){}moveEnd(){this.requestUpdate()}fetchBitmapData(t,e,r){return this.layer.fetchImageBitmap(t,e,r)}async doRefresh(){this.requestUpdate()}isUpdating(){return this._strategy.updating||this.updateRequested}};t([i()],m.prototype,"_strategy",void 0),m=t([a("esri.views.2d.layers.BaseDynamicLayerView2D")],m);const d=m;export{d as default};
