import { type ReactNode } from "react";
import type { RecentContexts, RecentItem, SearchRequest, SearchResult, SearchResultId } from "../../../../../../metabase-types/api";
import type { EntityPickerOptions, EntityPickerTab, TypeWithModel } from "../../types";
export type EntityPickerModalOptions = {
    showSearch?: boolean;
    hasConfirmButtons?: boolean;
    confirmButtonText?: string | ((model?: string) => string);
    cancelButtonText?: string;
    hasRecents?: boolean;
};
export declare const defaultOptions: EntityPickerModalOptions;
export declare const DEFAULT_RECENTS_CONTEXT: RecentContexts[];
export interface EntityPickerModalProps<Id extends SearchResultId, Model extends string, Item extends TypeWithModel<Id, Model>> {
    title?: string;
    selectedItem: Item | null;
    initialValue?: Partial<Item>;
    canSelectItem: boolean;
    tabs: EntityPickerTab<Id, Model, Item>[];
    options?: Partial<EntityPickerOptions>;
    searchResultFilter?: (results: SearchResult[]) => SearchResult[];
    recentFilter?: (results: RecentItem[]) => RecentItem[];
    searchParams?: Partial<SearchRequest>;
    actionButtons?: JSX.Element[];
    trapFocus?: boolean;
    /**defaultToRecentTab: If set to true, will initially show the recent tab when the modal appears. If set to false, it will show the tab
     * with the same model as the initialValue. Defaults to true. */
    defaultToRecentTab?: boolean;
    /**recentsContext: Defaults to returning recents based off both views and selections. Can be overridden by props */
    recentsContext?: RecentContexts[];
    onClose: () => void;
    onConfirm?: () => void;
    onItemSelect: (item: Item) => void;
    isLoadingTabs?: boolean;
    searchExtraButtons?: ReactNode[];
    children?: ReactNode;
}
export declare function EntityPickerModal<Id extends SearchResultId, Model extends string, Item extends TypeWithModel<Id, Model>>({ title, canSelectItem, selectedItem, initialValue, tabs: passedTabs, options, actionButtons, searchResultFilter, recentFilter, trapFocus, searchParams, defaultToRecentTab, recentsContext, onClose, onConfirm, onItemSelect, isLoadingTabs, children, }: EntityPickerModalProps<Id, Model, Item>): import("react/jsx-runtime").JSX.Element;
