/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import o from"../../request.js";import{srToRESTValue as r}from"../../geometry/support/spatialReferenceUtils.js";import{parseUrl as s,asValidOptions as n}from"../utils.js";import{conversionTypeKebabDict as t}from"./units.js";async function e(e,i,c){const p={};null!=i.sr&&"object"==typeof i.sr?p.sr=r(i.sr):p.sr=i.sr,p.coordinates=JSON.stringify(i.coordinates);const a=i.conversionType||"mgrs";p.conversionType=t.toJSON(a),p.conversionMode=i.conversionMode,p.numOfDigits=i.numOfDigits,p.rounding=i.rounding,p.addSpaces=i.addSpaces;const d=s(e),m={...d.query,f:"json",...p},u=n(m,c);return o(d.path+"/toGeoCoordinateString",u).then(({data:o})=>o.strings)}export{e as toGeoCoordinateString};
