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 GetLayer=class{execute(e,r,a){const i=validation.id("layerId",e.layerId,validation.never),t=validation.id("sublayerId",e.sublayerId,void 0),o=a.create();return inline(o.load(),function(){const r=o.findLayer(i);return void 0!==r&&null!==r?inline(r.load(),function(){if(void 0===t)return{layer:r.layer};var e=o.findLayer(t,r.layer);return null!=e?{layer:e.layer,sublayer:e.sublayer}:{}}):{}})}};GetLayer.action="gcx:wf:arcgis::GetLayer",GetLayer.suite="gcx:wf:builtin",GetLayer=__decorate([activate(MapProvider)],GetLayer);export{GetLayer};