import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{contains,crosses,disjoint,equals,intersects,overlaps,touches,within}from"@arcgis/core/geometry/geometryEngineAsync";class CompareGeometries{executeWith(e,t,r){switch(e){case"contains":return contains(t,r);case"crosses":return crosses(t,r);case"disjoint":return disjoint(t,r);case"equals":return equals(t,r);case"intersects":return intersects(t,r);case"overlaps":return overlaps(t,r);case"touches":return touches(t,r);case"within":return within(t,r)}}execute(e){var t=validation.exists("geometry1",e.geometry1),r=validation.exists("geometry2",e.geometry2),e=validation.string("operation",e.operation),r=this.executeWith(e,t,r);return inline(r,function(e){return{result:e}})}}CompareGeometries.action="gcx:wf:arcgis::CompareGeometries",CompareGeometries.suite="gcx:wf:builtin";export{CompareGeometries};