import React from 'react'; import { GroupBase } from 'react-select'; import { UseValidationProps, Validator } from '@interface-technologies/iti-react-core'; import { CommonSelectProps } from './CommonSelectProps'; import { SelectOption } from './SelectOption'; /** The value type for [[`ValidatedAsyncSelect`]]. */ export type AsyncSelectValue = SelectOption | null; export interface ValidatedAsyncSelectProps extends CommonSelectProps, UseValidationProps { loadOptions: (inputValue: string) => Promise[]>; noOptionsMessage?: (obj: { inputValue: string; }) => string | null; } /** * A validated dropdown component based on `react-select` that loads its * options via an API call. * * This component is expensive to render so use `React.memo` when necessary. */ export declare const ValidatedAsyncSelect: React.NamedExoticComponent; declare function required(): Validator; export declare const AsyncSelectValidators: { required: typeof required; }; export {};