import{executeQuery as e,executeCount as t}from"../../support/_query.js";import{isWFSLayerExtension as r}from"../../utilities/extensions.js";import{IdentifyProviderBase as o}from"./IdentifyProviderBase.js";export class WFSLayerQueryIdentifyProvider extends o{isSupported(e,t,o){return r(e)}_identify(t,r,o){const s=t,u=s.layer.createQuery(),i=r;return u.geometry=i,u.outFields=o.outFields??t.featureSettings.outFields,u.returnGeometry=o.returnGeometry,u.outSpatialReference=o.outSpatialReference,u.maxAllowableOffset=o.maxAllowableOffset,s.layer.capabilities.query.supportsPagination&&(u.num=o.maxResults),e(u,s,s.layer,o.cancelToken)}_count(e,r,o){const s=e,u=s.layer.createQuery();return u.geometry=r,u.num=o.maxResults,u.returnGeometry=o.returnGeometry,u.outFields=o.outFields??e.featureSettings.outFields,t(u,s,s.layer,o.cancelToken)}}