import{__decorate}from"tslib";import MosaicRule from"@arcgis/core/layers/support/MosaicRule";import RasterFunction from"@arcgis/core/layers/support/RasterFunction";import{validation}from"../../Validation.js";import{MapProvider}from"./MapProvider.js";import{inline}from"./tools.js";import{activate}from"../../Hooks.js";let SetImageryLayerOptions=class{execute(t,e,r){const i=validation.id("layerId",t.layerId,validation.never),o=r.create();return inline(o.load(),function(){const r=o.findLayer(i);return void 0!==r&&null!==r?inline(r.load(),function(){var e=t.mosaicRule;null!=e&&r.setProperty("mosaicRule",e instanceof MosaicRule?e:new MosaicRule(e));e=t.renderingRule;null!=e&&r.setProperty("renderingRule",e instanceof RasterFunction?e:new RasterFunction(e));e=t.pixelFilter;return"function"==typeof e&&r.setProperty("pixelFilter",e),r.redraw(),{mosaicRule:r.getProperty("mosaicRule"),renderingRule:r.getProperty("renderingRule"),pixelFilter:r.getProperty("pixelFilter")}}):{}})}};SetImageryLayerOptions.action="gcx:wf:arcgis::SetImageryLayerOptions",SetImageryLayerOptions.suite="gcx:wf:builtin",SetImageryLayerOptions=__decorate([activate(MapProvider)],SetImageryLayerOptions);export{SetImageryLayerOptions};