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