import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{difference,symmetricDifference}from"@arcgis/core/geometry/geometryEngineAsync";class DifferenceEngineTask{executeUsing(e,i,r){return(e?symmetricDifference:difference)(i,r)}execute(e){var i=validation.array("geometry",e.geometry,validation.never),r=validation.exists("subtractor",e.subtractor),e=validation.boolean("symmetric",e.symmetric,!1),r=this.executeUsing(e,i,r);return inline(r,function(e){e=Array.isArray(e)?e:[e];return{geometry:e[0],results:e}})}}DifferenceEngineTask.action="gcx:wf:arcgis::DifferenceEngineTask",DifferenceEngineTask.suite="gcx:wf:builtin";export{DifferenceEngineTask};