import{__decorate}from"tslib";import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{MapProvider}from"./MapProvider.js";import{activate}from"../../Hooks.js";let SetLayerPopup=class{execute(e,t,o){const a=validation.exists("template",e.template),r=validation.id("layerId",e.layerId,validation.never),i=o.create();return inline(i.load(),()=>{const e=i.findLayer(r);return e?inline(e.load(),()=>(e.setPopup(a),{})):{}})}};SetLayerPopup.action="gcx:wf:arcgis::SetLayerPopup",SetLayerPopup.suite="gcx:wf:builtin",SetLayerPopup=__decorate([activate(MapProvider)],SetLayerPopup);export{SetLayerPopup};