import React, { PureComponent } from 'react';
import { jsx } from '@emotion/react';
import type { WrappedComponentProps } from 'react-intl-next';
import type { ActivityProvider } from '@atlaskit/activity-provider';
import type { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
import type { HyperlinkState } from '../../../link';
import type { SearchProvider } from '../../../provider-factory';
import type { Command, LinkInputType } from '../../../types';
import type { LinkSearchListItemData } from '../../LinkSearch/types';
/**
 * Visible only to screenreaders. Use when there is a need
 * to provide more context to a non-sighted user.
 */
export declare const visuallyHiddenStyles: import("@emotion/react").SerializedStyles;
export declare const RECENT_SEARCH_LIST_SIZE = 5;
export declare const messages: {
    displayText: {
        id: string;
        defaultMessage: string;
        description: string;
    };
    clearText: {
        id: string;
        defaultMessage: string;
        description: string;
    };
    clearLink: {
        id: string;
        defaultMessage: string;
        description: string;
    };
    searchLinkAriaDescription: {
        id: string;
        defaultMessage: string;
        description: string;
    };
    searchLinkResults: {
        id: string;
        defaultMessage: string;
        description: string;
    };
    linkVisibleLabel: {
        id: string;
        defaultMessage: string;
        description: string;
    };
    textVisibleLabel: {
        id: string;
        defaultMessage: string;
        description: string;
    };
};
interface BaseProps {
    onSubmit?: (href: string, title: string | undefined, displayText: string | undefined, inputMethod: LinkInputType) => void;
    popupsMountPoint?: HTMLElement;
    popupsBoundariesElement?: HTMLElement;
    autoFocus?: boolean;
    activityProvider?: Promise<ActivityProvider>;
    searchProvider?: Promise<SearchProvider>;
    displayUrl?: string;
    pluginState: HyperlinkState;
    view: EditorView;
    onEscapeCallback?: Command;
    onClickAwayCallback?: Command;
}
interface DefaultProps {
    displayText: string;
}
export type Props = WrappedComponentProps & BaseProps & DefaultProps & WithAnalyticsEventsProps;
type HyperlinkLinkAddToolbarProps = WrappedComponentProps & BaseProps & Partial<DefaultProps> & WithAnalyticsEventsProps;
export interface State {
    activityProvider?: ActivityProvider;
    searchProvider?: SearchProvider;
    items: LinkSearchListItemData[];
    selectedIndex: number;
    displayUrl: string;
    isLoading: boolean;
    displayText: string;
}
export declare class HyperlinkLinkAddToolbar extends PureComponent<Props, State> {
    private submitted;
    private urlInputContainer;
    private displayTextInputContainer;
    private wrapperRef;
    private handleClearText;
    private handleClearDisplayText;
    private debouncedQuickSearch;
    private fireCustomAnalytics?;
    private quickSearchQueryVersion;
    private analyticSource;
    constructor(props: Props);
    componentDidMount(): Promise<void>;
    componentWillUnmount(): void;
    private getRecentItems;
    private fireAnalytics;
    private loadInitialLinkSearchResult;
    private quickSearch;
    private updateInput;
    private createClearHandler;
    private handleClickOutside;
    private getScreenReaderText;
    render(): jsx.JSX.Element;
    private isUrlPopulatedWithSelectedItem;
    private handleSelected;
    private handleInsert;
    private handleMouseEnterResultItem;
    private handleMouseLeaveResultItem;
    private handleSubmit;
    private handleClearTextKeyDown;
    private handleKeyDown;
    private updateTextInput;
    private handleCancel;
}
export declare const HyperlinkLinkAddToolbarWithIntl: React.FC<import("react-intl-next").WithIntlProps<HyperlinkLinkAddToolbarProps>> & {
    WrappedComponent: React.ComponentType<HyperlinkLinkAddToolbarProps>;
};
declare const _default: React.ForwardRefExoticComponent<Omit<import("react-intl-next").WithIntlProps<HyperlinkLinkAddToolbarProps>, keyof WithAnalyticsEventsProps> & React.RefAttributes<any>>;
export default _default;
