import React, { PureComponent } from 'react';
import { jsx } from '@emotion/react';
import type { SerializedStyles } from '@emotion/react';
import type { WithIntlProps, 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 { 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: SerializedStyles;
export declare const RECENT_SEARCH_LIST_SIZE = 5;
export declare const messages: {
    clearLink: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    clearText: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    displayText: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    hyperlinkAriaLabel: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    linkVisibleLabel: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    searchLinkAriaDescription: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    searchLinkResults: {
        defaultMessage: string;
        description: string;
        id: string;
    };
    textVisibleLabel: {
        defaultMessage: string;
        description: string;
        id: string;
    };
};
interface BaseProps {
    activityProvider?: Promise<ActivityProvider>;
    autoFocus?: boolean;
    displayUrl?: string;
    inputMethod?: string;
    onClickAwayCallback?: Command;
    onEscapeCallback?: Command;
    onSubmit?: (href: string, title: string | undefined, displayText: string | undefined, inputMethod: LinkInputType) => void;
    popupsBoundariesElement?: HTMLElement;
    popupsMountPoint?: HTMLElement;
    searchProvider?: Promise<SearchProvider>;
    searchSessionId?: string;
    timesViewed?: number;
    view: EditorView;
}
interface DefaultProps {
    displayText: string;
}
export type Props = WrappedComponentProps & BaseProps & DefaultProps & WithAnalyticsEventsProps;
type HyperlinkLinkAddToolbarProps = WrappedComponentProps & BaseProps & Partial<DefaultProps> & WithAnalyticsEventsProps;
export interface State {
    activityProvider?: ActivityProvider;
    displayText: string;
    displayUrl: string;
    isLoading: boolean;
    items: LinkSearchListItemData[];
    searchProvider?: SearchProvider;
    selectedIndex: number;
}
export declare class HyperlinkLinkAddToolbar extends PureComponent<Props, State> {
    private submitted;
    private urlInputContainer;
    private displayTextInputContainer;
    private wrapperRef;
    private listItemRefs;
    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;
    private listItemRefCallback;
    render(): jsx.JSX.Element;
    private isUrlPopulatedWithSelectedItem;
    private handleSelected;
    private handleInsert;
    private handleMouseEnterResultItem;
    private handleMouseLeaveResultItem;
    private handleSubmit;
    private handleClearTextKeyDown;
    private handleListItemFocus;
    private handleKeyDown;
    private updateTextInput;
    private handleCancel;
}
export declare const HyperlinkLinkAddToolbarWithIntl: React.FC<WithIntlProps<HyperlinkLinkAddToolbarProps>> & {
    WrappedComponent: React.ComponentType<HyperlinkLinkAddToolbarProps>;
};
declare const _default_1: React.ForwardRefExoticComponent<Omit<Omit<HyperlinkLinkAddToolbarProps, 'intl'> & {
    forwardedRef?: React.Ref<unknown>;
}, keyof WithAnalyticsEventsProps> & React.RefAttributes<unknown>>;
export default _default_1;
