/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as e,pointFromPolygonVertex as r}from"./support/shapeUtils.js";import{isPolygon as i,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";import{getPaths as s}from"../../../../geometry/support/curves/curveUtils.js";function p({templatePart:p,shape:l,edits:n,relationships:m,mode:a}){if(!i(l))return;const u=s(l);for(let i=0;i<u.length;i++){const s=u[i],f=s.length,g=e(s)?f-1:f;if("digitizing"===a&&n.length>o)break;for(let e=0;e<g&&!("digitizing"===a&&n.length>o);e++){const o=r(l,i,e);t({templatePart:p,shape:o,edits:n,relationships:m,mode:a})}}}const l=!1;export{p as execute,l as isAsync};
