!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib","./esriDelegate!esri/Graphic","./esriDelegate!esri/tasks/support/FeatureSet","./ArcGisApiVersion","../../Validation"],e)}(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var u=e("tslib"),p=e("./esriDelegate!esri/Graphic"),l=e("./esriDelegate!esri/tasks/support/FeatureSet"),r=e("./ArcGisApiVersion"),y=e("../../Validation"),e=(i.prototype.execute=function(e,t){var r,i=y.validation.array("geometry",e.geometries,[]).map(function(e){var t=new p.Graphic;return t.geometry=e,t}),e=y.validation.array("feature",e.features,[]),o=new l.FeatureSet;o.features=u.__spreadArrays(i,e);for(var a=0,n=o.features;a<n.length;a++){var s=n[a];if(null!==(r=null==s?void 0:s.geometry)&&void 0!==r&&r.type){o.geometryType=this.getGeometryType(s.geometry.type);break}}return{featureSet:o}},i.prototype.getGeometryType=function(e){if(r.isArcGisApiVersion3x)switch(e){case"point":return"esriGeometryPoint";case"multipoint":return"esriGeometryMultipoint";case"polyline":return"esriGeometryPolyline";case"polygon":return"esriGeometryPolygon";case"extent":return"esriGeometryEnvelope";default:return"esriGeometryNull"}return e},i.action="gcx:wf:arcgis::CreateFeatureSet",i.suite="gcx:wf:builtin",i);function i(){}t.CreateFeatureSet=e});