import { Events } from '../coreUtils/events';
import { ElementIri, ElementTypeIri, LinkTypeIri } from '../data/model';
import { DataProviderLookupParams } from '../data/provider';
import { Element } from '../diagram/elements';
import { SearchInputStore } from './utility/searchInput';
/**
 * Props for {@link InstancesSearch} component.
 *
 * @see {@link InstancesSearch}
 */
export interface InstancesSearchProps {
    /**
     * Additional CSS class for the component.
     */
    className?: string;
    /**
     * Controlled search input state store.
     *
     * If specified, renders the component in "headless" mode
     * without a text filter input.
     */
    searchStore?: SearchInputStore;
    /**
     * Debounce timeout in milliseconds after input to perform the text search.
     *
     * If set to `explicit`, the search will require explicit `Enter` keypress or
     * submit button click to initiate.
     *
     * @default "explicit"
     */
    searchTimeout?: number | 'explicit';
    /**
     * Minimum number of characters in the search term to initiate the search.
     *
     * @default 3
     */
    minSearchTermLength?: number;
    /**
     * Handler for the search criteria changes.
     */
    onChangeCriteria?: (criteria: SearchCriteria) => void;
    /**
     * Handler to call when elements are added from the results onto the canvas.
     *
     * This handler is called only when elements are added by explicit "Add ..."
     * button press and not via drag and drop.
     */
    onAddElements?: (elements: Element[]) => void;
    /**
     * Event bus to listen commands for this component.
     */
    commands: Events<InstancesSearchCommands>;
}
/**
 * Events for {@link InstancesSearch} event bus.
 */
export interface InstancesSearchCommands {
    /**
     * Can be triggered to set filter criteria and initiate the search.
     */
    setCriteria: {
        /**
         * Filter criteria to use for the search.
         */
        readonly criteria: SearchCriteria;
    };
}
/**
 * A filter criteria for the entity lookup from a {@link DataProvider}.
 *
 * @see {@link DataProviderLookupParams}
 */
export interface SearchCriteria {
    /**
     * Filter by a text lookup.
     */
    readonly text?: string;
    /**
     * Filter by an element type.
     */
    readonly elementType?: ElementTypeIri;
    /**
     * Filter by having a connected element with specified IRI.
     */
    readonly refElement?: ElementIri;
    /**
     * Filter by connection link type.
     *
     * Only applicable when {@link refElement} is set.
     */
    readonly refElementLink?: LinkTypeIri;
    /**
     * Reference element link type direction ('in' | 'out').
     *
     * Only when {@link refElementLink} is set.
     */
    readonly linkDirection?: 'in' | 'out';
}
/**
 * Component to search for entities by various filter criteria
 * to add them as elements to the diagram.
 *
 * @category Components
 */
export declare function InstancesSearch(props: InstancesSearchProps): import("react/jsx-runtime").JSX.Element;
export declare function createRequest(criteria: SearchCriteria): DataProviderLookupParams;
//# sourceMappingURL=instancesSearch.d.ts.map