import { PureComponent } from 'react';
import type { QuickInsertItem } from '../provider-factory';
import type { EmptyStateHandler } from '../types';
import type { Category, Modes } from './types';
export interface Props {
    categories?: Category[];
    mode: keyof typeof Modes;
    getItems: (query?: string, category?: string) => QuickInsertItem[];
    onSelectItem?: (item: QuickInsertItem) => void;
    onInsertItem: (item: QuickInsertItem) => void;
    showSearch: boolean;
    showCategories: boolean;
    defaultCategory?: string;
    emptyStateHandler?: EmptyStateHandler;
    viewMoreItem?: QuickInsertItem;
}
export interface State {
    items: QuickInsertItem[];
    categories: Category[];
    selectedCategory?: string;
    searchTerm?: string;
}
export default class ElementBrowser extends PureComponent<Props, State> {
    static defaultProps: {
        defaultCategory: string;
        onInsertItem: () => void;
    };
    state: State;
    componentDidMount(): void;
    getCategories: (items?: QuickInsertItem[]) => Category[];
    filterCategories: (items: QuickInsertItem[], categories?: Category[]) => Category[];
    fetchItems: (query?: string, category?: string) => QuickInsertItem[];
    componentDidUpdate(prevProps: Props, prevState: State): void;
    handleSearch: (searchTerm: string) => void;
    handleCategorySelection: (clickedCategory: Category) => void;
    render(): JSX.Element;
}
