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