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