/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{makeFeatureFromGroupPart as e}from"./support/builderUtils.js";import{isPolygon as t}from"../support/executorUtils.js";import r from"../../../../geometry/Point.js";import{polygonCentroidPoint as o}from"../../../../geometry/support/centroid.js";import{isCurvedGeometry as s}from"../../../../geometry/support/curves/curveUtils.js";import{densifyCurvedGeometry as m}from"../../../../geometry/support/curves/densifyCurvedGeometry.js";function i({templatePart:i,shape:p,edits:a,relationships:n,mode:u,xyTolerance:c,associationFeaturesByTemplate:l}){if(!t(p))return;s(p)&&(p=m(p,{maxSegmentsPerCurve:"completion"===u?12e3:300,maxSegmentLength:c}));const f=o(p);f&&e({templatePart:i,shape:r.fromJSON(f),edits:a,relationships:n,mode:u,associationFeaturesByTemplate:l})}const p=!1;export{i as execute,p as isAsync};
