/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import e from"../../../core/Error.js";function r(e){return"multipoint"===e||"polygon"===e||"polyline"===e}async function t(){return{unionOperator:await import("../../../geometry/operators/unionOperator.js")}}async function o(r){const{unionOperator:o}=await t(),n=r.map(r=>{if(!r.geometry)throw new e("editing:invalid-argument","All features must have a geometry.");return r.geometry}),i=o.executeMany(n);if(!i)throw new e("editing:merge-failed","Failed to merge feature geometries.");return i}export{r as isMergeableGeometryType,o as mergeFeatures};
