import type { JSX } from "../../stencil-public-runtime";
import type { ApiVersion } from "@what3words/api";
import type { SuggestionsPayload } from "../what3words-autosuggest/domain";
import type { W3wAddressFormat } from "./domain";
/**
 * @slot input - The textarea or input element to get suggestions from when typing
 * ```
 * <what3words-notes api-key="YOUR_API_KEY">
 *  <textarea slot="input"></textarea>
 *  <!-- OR -->
 *  <input slot="input" type="text" />
 * </what3words-notes>
 * ```
 * @slot label - The label element for the input slot element
 * ```
 * <what3words-notes api-key="YOUR_API_KEY">
 *  <label slot="label" for="delivery-notes">Delivery Notes/label>
 *  <textarea slot="input" name="delivery-notes"></textarea>
 * </what3words-notes>
 * ```
 * @slot tooltip - The tooltip content to display when the status icon is clicked
 * ```
 * <what3words-notes api-key="YOUR_API_KEY">
 *  <textarea slot="input"></textarea>
 *  <div slot="tooltip">
 *    <h1>Custom title</h1>
 *    <p>custom content</p>
 *  </div>
 * </what3words-notes>
 * ```
 */
export declare class What3wordsNotes {
    private el;
    /**
     * The format to display the what3words address in
     * - `slashes` - e.g. `///filled.count.soap` (default)
     * - `url` - e.g. `https://w3w.co/filled.count.soap`
     * @default slashes
     */
    addressFormat: W3wAddressFormat;
    /**
     * Show the what3words hints tooltip when clicking on the what3words status icon
     * @default true
     */
    showHintsTooltip: boolean;
    /**
     * The callback function to execute when the component is loaded
     */
    callback: string;
    /**
     * The what3words API key to use for the what3words API requests
     */
    apiKey: string;
    /**
     * The headers to include in the what3words API requests
     */
    headers: string;
    /**
     * The base URL for the what3words API requests
     */
    baseUrl: string;
    /**
     * The API version to use for the what3words API requests
     * @default "v3"
     */
    apiVersion: ApiVersion;
    /**
     * The delay in milliseconds to wait after the user has finished typing before making an autosuggest request
     * @default 300
     */
    typeaheadDelay: number;
    /**
     * The language to return the results in
     * @example "en"
     */
    language: string;
    /**
     * The focus point to prioritize results around. If not provided, the user's current location is used.
     * @example "51.5412,-0.2477"
     */
    searchFocus?: `${number},${number}`;
    /**
     * The number of results to return
     * @default 3
     */
    nFocusResults: number;
    /**
     * Clip the results to a specific country
     * @example "GB"
     */
    clipToCountry: string;
    /**
     * Clip the results to a specific bounding box
     * @example "51.521,-0.205,51.576,-0.105"
     */
    clipToBoundingBox: string;
    /**
     * Clip the results to a specific circle
     * @example "51.521,-0.205,1000"
     */
    clipToCircle: string;
    /**
     * Clip the results to a specific polygon
     * @example "51.521,-0.205,51.576,-0.105,51.576,-0.205"
     */
    clipToPolygon: string;
    /**
     * Emitted when the input value changes
     * @example { value: "filled.count.s" }
     */
    private valueChanged;
    /**
     * Emitted when the input value is a valid what3words address
     * @example { value: "filled.count.soap" }
     */
    private valueValid;
    /**
     * Emitted when the input value is not a valid what3words address
     * @example { value: "filled,count,s" }
     */
    private valueInvalid;
    /**
     * Emitted when a suggestion is selected
     * @example { suggestion: { words: "filled.count.soap", [...] } }
     */
    private suggestionSelected;
    /**
     * Emitted when the suggestions change
     */
    private suggestionsChanged;
    /**
     * Emitted when a suggestion is hovered over
     */
    private suggestionHover;
    /**
     * Emitted when a what3words API error occurs
     */
    private apiError;
    private value;
    private suggestions;
    private selectedSuggestions;
    private updatingSelectedSuggestions;
    private apiRequestTimeout?;
    private loading;
    private hoverIndex;
    private clients;
    private tooltipOpen;
    /**
     * Watches for changes to the apiKey property
     * @param key The api key
     */
    setApiKey(key: string): void;
    /**
     * Watches for changes to the baseUrl property
     * @param base_url The base url
     */
    setBaseUrl(host: string): void;
    /**
     * Watches for changes to the apiVersion property
     * @param apiVersion The version
     */
    setApiVersion(api_version: ApiVersion): void;
    /**
     * Watches for changes to the headers property
     * @param value The headers value
     */
    setHeaders(value: string): void;
    /**
     * Watches for changes to the loading state
     */
    private handleLoadingChange;
    /**
     * Watches for changes to the suggestions state
     */
    private handleSuggestionsChange;
    private getComponentHeaders;
    private getRequestOptions;
    /**
     * @returns { HTMLTextAreaElement | HTMLInputElement }
     */
    private getInputSlotElement;
    /**
     * Formats a what3words address based on the specified format.
     *
     * @param value - The what3words address to format.
     * @param format - The format to use for the address. Possible values are 'url' and 'slashes'.
     * @returns The formatted what3words address.
     */
    private formatW3wAddress;
    /**
     * Look for a what3words address at the current cursor position in the input element and replace it with the selected suggestion
     *
     * @param { string } value The value to set
     */
    private setInputValue;
    /**
     * Gets/sets the value state for the input element
     * @param { string } value The value to set
     */
    private setValue;
    /**
     * Get/set the autosuggestions state value
     * @param { AutosuggestOption[] } suggestions The suggestions to set
     */
    private setSuggestions;
    /**
     * Sets selected w3w addresses
     * @param suggestions new list of selected w3w address
     * @param delayedUpdate simulates loading effect
     * @returns
     */
    private setSelectedSuggestions;
    /**
     * Sets the loading state value
     * @param { boolean } loading The state to set
     */
    private setLoading;
    /**
     * Animation to show the suggestions list based on the the available space above the input
     */
    private showSuggestions;
    /**
     * Animation to hide the suggestions list based on the the available space above the input
     */
    private hideSuggestions;
    /**
     * Animation to show the tooltip based on the the available space above the input
     */
    private openTooltip;
    /**
     * Animation to hide the tooltip based on the the available space above the input
     */
    private closeTooltip;
    /**
     * Gets/sets the hover index value
     * @param { number } hoverIndex The hover index value to set
     */
    private setHoverIndex;
    /**
     * Emits the could not retrieve co-ordinates error
     */
    private emitFatalError;
    private clearApiError;
    /**
     * Asynchronously retrieves autosuggestion results for a given search string and sets the results against the
     * component state. This method is idempotent and has a timeout delay to throttle requests, waiting for the user to
     * stop typing.
     * @param value The search string to retrieve autosuggestions for.
     */
    private getAutosuggestions;
    private isValid3wa;
    private extract3wa;
    /**
     * Ensures that the what3words found on the input slot
     * Matches against the selectedSuggestions state
     */
    private matchSelected3waFromInputSlot;
    private handleValueChanged;
    private handleValueValid;
    private handleValueInvalid;
    private handleSuggestionsChanged;
    private handleSuggestionSelected;
    private handleSuggestionHover;
    private handleBlur;
    private handleInput;
    private handleKeyDown;
    private handleContextMenu;
    private handleWindowClick;
    private handleScroll;
    private getSuggestionsStyle;
    /**
     * Finds the what3words address at the current cursor position in the textarea element.
     */
    private findW3wAtCursorPosition;
    private onSuggestionSelected;
    private onMouseOver;
    private onMouseOut;
    connectedCallback(): void;
    disconnectedCallback(): void;
    componentWillLoad(): Promise<CustomEvent<SuggestionsPayload> | undefined>;
    /**
     * Calculates the cursor position by creating a mirror (div) element which copies all common properties from InputSlot.
     * The InputSlot's string content will be the div's textContent and an HTMLSpanElement will be appended at the end of the text.
     * The span element is what's used to determine where the cursor position is.
     * @param inputSlot
     * @returns
     */
    private getCursorPosition;
    private getLineHeight;
    render(): JSX.Element;
}
