import * as React from 'react';
import { ElementModel, ElementTypeIri } from '../data/model';
import { SearchInputStore } from '../widgets/utility/searchInput';
import { type WorkspaceContext } from '../workspace/workspaceContext';
export interface ElementTypeSelectorProps {
    source: ElementModel;
    elementValue: ElementValue;
    onChange: (state: Pick<ElementValue, 'value' | 'isNew' | 'loading'>) => void;
}
export interface ElementValue {
    value: ElementModel;
    isNew: boolean;
    loading: boolean;
    error?: string;
    validated: boolean;
    allowChange: boolean;
}
export declare function ElementTypeSelector(props: ElementTypeSelectorProps): import("react/jsx-runtime").JSX.Element;
interface ElementTypeSelectorInnerProps extends ElementTypeSelectorProps {
    searchStore: SearchInputStore;
    workspace: WorkspaceContext;
}
interface State {
    elementTypes?: ReadonlyArray<ElementTypeIri>;
    elementTypesState: 'none' | 'loading' | 'error';
    existingElements: ReadonlyArray<ElementModel>;
    existingElementsState: 'none' | 'loading' | 'error';
}
export declare class ElementTypeSelectorInner extends React.Component<ElementTypeSelectorInnerProps, State> {
    private readonly listener;
    private readonly cancellation;
    private filterCancellation;
    private loadingItemCancellation;
    constructor(props: ElementTypeSelectorInnerProps);
    componentDidMount(): void;
    componentWillUnmount(): void;
    private fetchPossibleElementTypes;
    private searchExistingElements;
    private onElementTypeChange;
    private renderPossibleElementType;
    private renderElementTypeSelector;
    private renderExistingElementsList;
    private onSelectExistingItem;
    render(): import("react/jsx-runtime").JSX.Element;
}
export declare function validateElementType(element: ElementModel, workspace: WorkspaceContext): Promise<Pick<ElementValue, 'error' | 'allowChange'>>;
export {};
//# sourceMappingURL=elementTypeSelector.d.ts.map