define(["require","exports","tslib","./esriDelegate!esri/Graphic","./esriDelegate!esri/tasks/support/FeatureSet","./ArcGisApiVersion","../../Validation"],function(e,r,u,y,l,t,p){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var i=(o.prototype.execute=function(e,r){var t,i=p.validation.array("geometry",e.geometries,[]).map(function(e){var r=new y.Graphic;return r.geometry=e,r}),e=p.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!==(t=null==s?void 0:s.geometry)&&void 0!==t&&t.type){o.geometryType=this.getGeometryType(s.geometry.type);break}}return{featureSet:o}},o.prototype.getGeometryType=function(e){if(t.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},o.action="gcx:wf:arcgis::CreateFeatureSet",o.suite="gcx:wf:builtin",o);function o(){}r.CreateFeatureSet=i});