/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/tslib.es6","../../../../core/Accessor","../../../../core/maybe","../../../../core/accessorSupport/decorators/property","../../../../core/arrayUtils","../../../../core/has","../../../../core/accessorSupport/ensureType","../../../../core/accessorSupport/decorators/subclass","./queryEngineUtils"],(function(e,r,t,o,n,a,i,c,s,u,p){"use strict";e.FeatureCollectionSnappingSource=function(e){function t(r){return e.call(this,r)||this}r._inheritsLoose(t,e);var o=t.prototype;return o.refresh=function(){},o.fetchCandidates=function(){var e=r._asyncToGenerator((function*(e,r){const t=this.layerSource.layer.source;return t.querySnapping?(yield t.querySnapping({distance:e.distance,point:e.coordinateHelper.vectorToPoint(e.point).toJSON(),types:e.types,query:n.isSome(e.filter)?e.filter.createQuery().toJSON():{where:"1=1"}},{signal:r})).candidates.map((r=>p.convertSnappingCandidate(r,e.coordinateHelper,e.elevationInfo))):[]}));function t(r,t){return e.apply(this,arguments)}return t}(),r._createClass(t,[{key:"availability",get:function(){return 1}}]),t}(o),t.__decorate([a.property({constructOnly:!0})],e.FeatureCollectionSnappingSource.prototype,"layerSource",void 0),t.__decorate([a.property({readOnly:!0})],e.FeatureCollectionSnappingSource.prototype,"availability",null),e.FeatureCollectionSnappingSource=t.__decorate([u.subclass("esri.views.interactive.snapping.featureSources.FeatureCollectionSnappingSource")],e.FeatureCollectionSnappingSource),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
