define(["require","exports","tslib","../../Validation","./MapProvider","../../Hooks","./tools"],function(i,e,t,o,a,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});n.prototype.execute=function(i,e,t){var a=o.validation.id("layerId",i.layerId,o.validation.never),l=o.validation.id("sublayerId",i.sublayerId,void 0),n=o.validation.boolean("visibility",i.visible),r=t.create();return s.inline(r.load(),function(){var e=r.findLayer(a);return null!=e?s.inline(e.load(),function(){if(void 0===l)return{wasVisible:e.getVisible(),nowVisible:e.setVisible(n)?n:void 0};var i=r.findLayer(l,e.layer);return null==i?{}:{wasVisible:i.getVisible(),nowVisible:i.setVisible(n)?n:void 0}}):{}})},n.action="gcx:wf:arcgis::SetLayerVisibility",n.suite="gcx:wf:builtin",a=t.__decorate([l.activate(a.MapProvider)],n);function n(){}e.SetLayerVisibility=a});