import{validation}from"../../Validation.js";import{inline}from"./tools.js";import{geodesicLength,planarLength}from"@arcgis/core/geometry/geometryEngineAsync";class LengthEngineTask{executeUsing(e,n,i){return(e?geodesicLength:planarLength)(n,i)}execute(e){var n=validation.exists("geometry",e.geometry),i=validation.boolean("geodesic",e.geodesic,!1),e=this.executeUsing(i,n,e.unit);return inline(e,function(e){return{length:e}})}}LengthEngineTask.action="gcx:wf:arcgis::LengthEngineTask",LengthEngineTask.suite="gcx:wf:builtin";export{LengthEngineTask};