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