import Collection from "@arcgis/core/core/Collection";
import type Point from "@arcgis/core/geometry/Point";
import { Feature, SCORE_FIELD } from "../../data/Feature.js";
import { Schema } from "../../data/Schema.js";
import type { ArcGISRequestHelper } from "../../support/ArcGISRequestHelper.js";
import type { PropertyDefs } from "../../support/Serializable.js";
import type { PortalItemLike } from "../../utilities/portal.js";
import type { CountResult } from "../CountResult.js";
import type { AddressLike, GeocoderProperties } from "./Geocoder.js";
import { ADDRESS_FIELD, GeocodeOptions, Geocoder } from "./Geocoder.js";
export { ADDRESS_FIELD, SCORE_FIELD };
/**
 * Properties that can be passed into the constructor for {@link ArcGISGeocoder}.
 */
export interface ArcGISGeocoderProperties extends GeocoderProperties {
    /**
     * See {@link ArcGISGeocoder.url}.
     */
    url?: string;
    /**
     * See {@link ArcGISGeocoder.countryCode}.
     */
    countryCode?: string;
    /**
     * See {@link ArcGISGeocoder.categories}.
     */
    categories?: string[];
    /**
     * See {@link ArcGISGeocoder.requestHelper}.
     */
    requestHelper?: ArcGISRequestHelper;
    /**
     * When present, the geocoder will be loaded from the given item in Portal.
     */
    $portalItem?: PortalItemLike;
}
/**
 * Represents an ArcGIS geocoding service.
 */
export declare class ArcGISGeocoder extends Geocoder<ArcGISGeocoderProperties> {
    /**
     * The {@link utilities/RequestHelper!RequestHelper} to use when making
     * requests to external services. If not specified, a default implementation
     * will be used.
     */
    get requestHelper(): ArcGISRequestHelper;
    set requestHelper(requestHelper: ArcGISRequestHelper);
    /**
     * The address categories used to filter results.
     */
    get categories(): Collection<string>;
    /**
     * The URL of the ArcGIS geocode server.
     */
    get url(): string;
    set url(value: string);
    /**
     * The country code used to filter results.
     */
    countryCode: string;
    private _categories;
    private _requestHelper;
    private _singleLineAddressField;
    private _maxBatchSize;
    private _url;
    private readonly _magicKeyAddressMap;
    /**
     * Creates an ArcGIS Geocoder from an ItemConfig that contains a $portalItem
     * reference.
     *
     * @param portalItem The portal item containing geocoder config.
     * @param arcGISGeocoderProperties The configuration for the ArcGIS
     *   Geocoder.
     */
    static fromPortalItem(portalItem: PortalItemLike, arcGISGeocoderProperties?: ArcGISGeocoderProperties): Promise<ArcGISGeocoder>;
    /**
     * Updates the url that this ArcGIS geocoder makes its requests to.
     *
     * @param url The new url to use for the ArcGIS geocoder.
     */
    updateUrl(url: string): Promise<void>;
    /**
     * @inheritDoc
     */
    geocode(address: AddressLike, options?: GeocodeOptions): AsyncIterable<Feature>;
    /**
     * @inheritDoc
     */
    count(address: AddressLike, options?: GeocodeOptions): Promise<CountResult>;
    /**
     * @inheritDoc
     */
    batchGeocode(addresses: AddressLike[], options?: GeocodeOptions): AsyncIterable<Feature>;
    /**
     * @inheritDoc
     */
    suggest(searchText: string, options?: GeocodeOptions): Promise<string[]>;
    /**
     * @inheritDoc
     */
    reverseGeocode(location: Point, options?: GeocodeOptions): Promise<Feature>;
    protected _getSerializableProperties(): PropertyDefs<ArcGISGeocoderProperties>;
    protected _createSchema(): Schema;
    protected _createAddressSchema(): Schema;
    protected _onInitialize(): Promise<void>;
    private _getGeocodeService;
    private _updateGeocodeProperties;
    private _addressToAttributes;
    private _candidateToFeature;
}
