import{__decorate}from"tslib";import{validation}from"../../Validation.js";import{MapProvider}from"./MapProvider.js";import{activate}from"../../Hooks.js";import{inline}from"./tools.js";let RemoveLayer=class{execute(e,o,r){const a=validation.id("layerId",e.layerId,validation.never),i=r.create();return inline(i.load(),function(){const e=i.findLayer(a);return void 0!==e&&null!==e?{success:e.removeLayer()}:{success:!1}})}};RemoveLayer.action="gcx:wf:arcgis::RemoveLayer",RemoveLayer.suite="gcx:wf:builtin",RemoveLayer=__decorate([activate(MapProvider)],RemoveLayer);export{RemoveLayer};