import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
import type { AlgoliaSearchResultDetail, SearchIndex } from '../algolia/algolia-interface';
import type { AlgoliaNetworkError, MyAccountData } from './global-nav-interface';
/**
 * The Global nav component standardises navigation within and across web applications.
 *
 * @version 8.0.0
 * @status new
 *
 * @slot menu - Main menu items. Can be used with `<nano-nav-item>` or `<a>` elements.
 * @slot - Main site content.
 *
 * @part main-menu - The main menu bar nav element.
 * @part search-form - The search form element.
 * @part search-input - The search input element.
 * @part search-select - The search select element.
 * @part wrapper - The main wrapper for the component.
 * @part drawer - The drawer element which controls the overflow menu.
 * @part overflow-header - The header for the overflow menu.
 * @part overflow-menu - The overflow menu items.
 * @part menu-bar - The main menu bar.
 * @part site-wrapper - The main site content area.
 * @part logo-link - The logo link element.
 * @part logo - The logo element.
 * @part user-panel - The user panel element.
 * @part site-search-results - The nano-global-search-results element
 */
export declare class GlobalNav implements ComponentInterface {
    host: HTMLNanoGlobalNavElement;
    private overflowMenu;
    overflowOpen: boolean;
    /** The link to put on the logo */
    logoUrl: string;
    /** Url to the Nanopore store cart. Will default to the url supplied by MyAccount */
    cartUrl: string;
    /** Url to the Nanopore message center. Will default to the url supplied by MyAccount  */
    msgUrl: string;
    /** Url to the Nanopore login page. Will default to the url supplied by MyAccount */
    loginUrl: string | (() => void);
    /** Url to the Nanopore login page. Will default to the url supplied by MyAccount */
    logoutUrl: string | (() => void);
    /** Url to the Nanopore contact page */
    contactUrl: string;
    private _sessionRedirect;
    /** A url to take the user after login or logout. Defaults to current URL. Is automatically URI encoded */
    get sessionRedirect(): string;
    set sessionRedirect(val: string);
    /** MyAccount store cart count.*/
    cartCount: number;
    /** MyAccount un-read message count. */
    msgCount: number;
    /** Manually open the overflow menu */
    openOverflowMenu(): Promise<void>;
    /** Manually close the overflow menu */
    closeOverflowMenu(): Promise<void>;
    /** A base url to retrieve global nav / sso data. `nav_bar_data.json` will be appended to this url */
    myAccountUrl?: string;
    handleMyAccountUrl(): Promise<void>;
    /**
     * MyAccount data is automatically set via `myAccountUrl`.
     * Alternatively you can directly provide a JSON object which is useful for SSR
     * (ref https://myaccount.nanoporetech.com/nav_bar_data.json)
     */
    myAccountData: MyAccountData | null;
    /** Emitted when myaccount data has loaded */
    nanoUserData: EventEmitter<MyAccountData['user']>;
    private userLinks;
    isLoggedIn: boolean;
    /** Logged in user details automatically populated from MyAccount */
    get myAccountUser(): MyAccountData['user'];
    processUserData(): void;
    private formatLoginLink;
    private resizeObserver;
    private cachedWidth;
    private mainMenu;
    private _mainMenuBar;
    get mainMenuBar(): HTMLElement;
    set mainMenuBar(el: HTMLElement);
    /**
     * Manually triggers the main menu bar resize behaviour.
     * This can be useful if you append new children to the global-nav
     */
    triggerResize(): Promise<void>;
    shouldResize: boolean;
    breakpoint: 0 | 1 | 2 | 3 | 4;
    breakpointChanged(): void;
    private debounceResetResize;
    private addMainmenuRo;
    private removeMainmenuRo;
    private handleResize;
    private algoliaClient;
    private searchResults;
    private searchInput;
    private activeIndex;
    private autocompleteResults;
    private searchForm;
    searchIndices: SearchIndex[];
    searchBarShown: boolean;
    searchLoading: boolean;
    _searchValue: string;
    /** Emitted when search results are successfully returned from Algolia. */
    nanoSearchResult: EventEmitter<AlgoliaSearchResultDetail>;
    /** Emitted when algolia returns an error. */
    nanoSearchError: EventEmitter<AlgoliaNetworkError>;
    /** Emitted when search field is cleared. */
    nanoSearchReset: EventEmitter<AlgoliaSearchResultDetail>;
    /** Algolia search index to search within */
    searchIndex: string;
    /** A search string used to load and show autocomplete results */
    get searchValue(): string;
    set searchValue(val: string);
    /** Send the current search term and selected index to a nested `nano-global-search-results` */
    submitSearch(): Promise<void>;
    handleSearchIndex(): SearchIndex;
    initSearch(): void;
    /**
     * Called whenever the search form is submitted (but can also be called manually).
     * Fires event which will activate / display `nano-global-search-results`
     */
    private onSearchSubmit;
    private doAlgoliaSearch;
    /**
     * Process a set (or multiple sets) of algolia results
     * and applies correct domain names / http protocol to each result's url
     * @returns algolia results with correct domains applied
     */
    private processSearchResults;
    private domainFor;
    private setAutocompleteResults;
    private autocompleteSnippet;
    private handleSearchOpenEvent;
    private handleSearchCloseEvent;
    private handleSearchTermInputEvent;
    private handleSearchTermChangeEvent;
    private handleSearchIndexChangeEvent;
    constructor();
    componentWillLoad(): void;
    componentDidRender(): void;
    private loggedInPanel;
    private bpPartials;
    private noResultPartial;
    render(): any;
}
