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