import { LitElement, TemplateResult } from 'lit'; import { BBox, EnableReverse, Feature, ProximityRule, ShowPlaceType, TypeRule, Worldview } from '../types.js'; import { MaptilerGeocoderEventName, MaptilerGeocoderEventNameMap } from './geocoder-events.js'; import { MaptilerGeocoderOptions } from './geocoder-options.js'; type InputElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement; export declare class MaptilerGeocoderElement extends LitElement implements MaptilerGeocoderOptions { #private; /** @internal */ static styles: import('lit').CSSResult; adjustUrl?: (url: URL) => void; apiKey?: string; apiUrl?: string; bbox?: BBox; clearButtonTitle?: string; clearListOnPick: boolean; clearOnBlur: boolean; collapsed: boolean; country?: string | string[]; debounceSearch?: number; enableReverse?: EnableReverse; errorMessage?: string; excludeTypes: boolean; exhaustiveReverseGeocoding: boolean; fetchFullGeometryOnPick: boolean; fetchParameters?: RequestInit; filter?: (feature: Feature) => boolean; fuzzyMatch?: boolean | undefined; iconsBaseUrl?: string; keepListOpen: boolean; language?: string | string[] | null; limit?: number; minLength?: number; noResultsMessage?: string; openListOnTop: boolean; placeholder?: string; proximity?: ProximityRule[] | null; reverseActive: boolean; reverseButtonTitle?: string; reverseGeocodingExcludeTypes?: boolean | undefined; reverseGeocodingLimit?: number; reverseGeocodingTypes?: TypeRule[]; selectFirst?: boolean | undefined; showPlaceType?: ShowPlaceType; showResultsWhileTyping?: boolean | undefined; types?: TypeRule[]; worldview?: Worldview; private contentSlotElements; private inputSlotElements; private searchButtonElements; private clearButtonElements; private reverseButtonElements; private clearErrorButtonElements; private searchIconElements; private clearIconElements; private reverseIconElements; private clearErrorIconElements; /** Value to search via geocoding */ private searchValue; /** Features found via geocoding */ private listFeatures?; /** Index of item currently selected from the list of found features */ private selectedItemIndex; /** Feature that has been picked by the user */ private picked?; /** Cached found features to be used to restore the features when loading more data for picked feature */ private cachedFeatures; /** Effectively a cache key for cached features */ private lastSearchUrl; /** Last error that happened in geocoding, to be shown to user */ private error; /** AbortController instance used to potentially cancel the current geocoding request*/ private abortController?; /** Focus state of input element */ private focused; /** Visibility state of feature list */ private isFeatureListVisible; /** Feature list is currently interacted with using pointer device so it should not be closed even though input lost focus */ private isFeatureListInteractedWith; get isLoading(): boolean; get input(): InputElement | undefined; protected firstUpdated(): void; /** * Set the options of this instance. * * @param options options to set */ setOptions(options: Partial): void; /** * Set the content of search input box. * * @param value text to set */ setQuery(value: string): void; /** * Set the content of search input box and immediately submit it. * * @param value text to set and submit */ submitQuery(value: string): void; /** * Clear search result list. */ clearList(): void; /** * Focus the search input box. * * @param options [FocusOptions](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options) */ focus(options?: FocusOptions): void; /** * Blur the search input box. */ blur(): void; addEventListener(type: E, listener: (this: HTMLElement, e: MaptilerGeocoderEventNameMap[E]) => unknown, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, e: HTMLElementEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: E, listener: (this: HTMLElement, e: MaptilerGeocoderEventNameMap[E]) => unknown, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, e: HTMLElementEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; /** @internal */ handleMapChange(centerAndZoom: [zoom: number, lon: number, lat: number] | undefined): void; /** @internal */ handleMapClick(coordinates: [lng: number, lat: number]): void; willUpdate(changedProperties: Map): void; protected render(): TemplateResult | symbol; } declare global { interface HTMLElementTagNameMap { "maptiler-geocoder": MaptilerGeocoderElement; } } export {};