!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","../../Validation","./MapProvider","../../Hooks","./tools"],e)}(function(e,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e("tslib"),s=e("../../Validation"),o=e("./MapProvider"),r=e("../../Hooks"),a=e("./tools"),o=(t.prototype.execute=function(e,i,n){var o=s.validation.string("expression",e.expression,s.validation.never),r=(s.validation.id("layerId",e.layerId,s.validation.never),s.validation.id("sublayerId",e.sublayerId,void 0)),t=n.create();return a.inline(t.load(),function(){var i=t.findLayer(e.layerId);return null!=i?a.inline(i.load(),function(){if(void 0===r)return{oldExpression:i.getDefinitionExpression(),newExpression:i.setDefinitionExpression(o)?o:void 0};var e=t.findLayer(r,i.layer);return null==e?{}:{oldExpression:e.getDefinitionExpression(),newExpression:e.setDefinitionExpression(o)?o:void 0}}):{}})},t.action="gcx:wf:arcgis::SetLayerDefinitionExpression",t.suite="gcx:wf:builtin",n.__decorate([r.activate(o.MapProvider)],t));function t(){}i.SetLayerDefinitionExpression=o});