define(["require","exports","tslib","../../Validation","./tools","./MapProvider","../../Hooks"],function(e,n,t,d,u,o,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0});a.prototype.execute=function(e,n,t){var o=d.validation.string("url",e.url,d.validation.never),o=u.addToPath(o,"reverseGeocode"),i=d.validation.exists("location",e.location),a=d.validation.number("distance",e.distance,void 0),r=d.validation.string("languageCode",e.languageCode,void 0),l=d.validation.boolean("returnIntersection",e.returnIntersection,!1),c=d.validation.number("timeout",e.timeout,void 0),l={location:i instanceof Array?i.toString():i,distance:a,outSR:t.getOutSR(e.outSpatialReference),langCode:r,returnIntersection:l},c=u.fetch(o,l,c,n.cancellationToken.signal);return u.schedulePromiseCancellation(n,c),u.inline(c,function(e){return{address:e.address,location:e.location}},e.continueOnError?function(){return{address:null,location:null}}:null)},a.action="gcx:wf:arcgis::ReverseGeocode",a.suite="gcx:wf:builtin",o=t.__decorate([i.activate(o.MapProvider)],a);function a(){}n.ReverseGeocode=o});