/*
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/Loadable","../../../../core/maybe","../../../../core/accessorSupport/decorators/property","../../../../core/arrayUtils","../../../../core/has","../../../../core/accessorSupport/ensureType","../../../../core/accessorSupport/decorators/subclass"],(function(t,e,r,o,s,a,i,n,p){"use strict";let c=function(e){function r(){var t;return(t=e.apply(this,arguments)||this).type="raster-layer-adapter",t}t._inheritsLoose(r,e);var s=r.prototype;return s.updateRasterInfo=function(){var e=t._asyncToGenerator((function*(t){this.rasterInfo=yield this.generateRasterInfo(t),this.renderingRule=null==t?void 0:t.renderingRule}));function r(t){return e.apply(this,arguments)}return r}(),s.updateRasterInfoWithEstimatedStats=function(){var e=t._asyncToGenerator((function*(t){const e=this.rasterInfo;if(o.isNone(e.histograms)||o.isNone(e.statistics)){const r=yield this.estimateStatisticsHistograms(t);o.isSome(r)&&(o.isNone(e.statistics)&&(e.statistics=r.statistics),o.isNone(e.histograms)&&(e.histograms=r.histograms))}}));function r(t){return e.apply(this,arguments)}return r}(),r}(r);e.__decorate([s.property()],c.prototype,"layer",void 0),e.__decorate([s.property()],c.prototype,"rasterInfo",void 0),e.__decorate([s.property()],c.prototype,"renderingRule",void 0),e.__decorate([s.property({readOnly:!0})],c.prototype,"type",void 0),e.__decorate([s.property()],c.prototype,"version",void 0),c=e.__decorate([p.subclass("esri.smartMapping.support.adapters.RasterLayerAdapter")],c);return c}));
