define(["require","exports","tslib","../../Validation","./tools","./MapProvider","../../Hooks","./ArcGisApiVersion"],function(e,r,i,o,u,t,a,s){"use strict";Object.defineProperty(r,"__esModule",{value:!0});n.prototype.execute=function(e,r,i){var t=o.validation.id("layerId",e.layerId,void 0),a=o.validation.string("geometryType",e.geometryType,void 0),n=i.create();return u.inline(n.load(),function(){if(t){var r=n.findLayer(t);if(null!=r)return u.inline(r.load(),function(){var e=r.getFeatures();return null!=(e=void 0!==a?e.filter(function(e){return e.geometry.type===a}):e)?{features:e}:{}})}if(s.isArcGisApiVersion3x)return{features:n.map.graphics.graphics};var i=[];return n.view.graphics.forEach(function(e){i.push(e)}),{features:i}})},n.action="gcx:wf:arcgis::GetGraphicsLayerFeatures",n.suite="gcx:wf:builtin",t=i.__decorate([a.activate(t.MapProvider)],n);function n(){}r.GetGraphics=t});