import React from 'react';
import { FormLabel } from '../../../module';
import { SelectGroupType } from './NewSelectHelpers';
import { SearchBarProps } from '../../SearchBar/SearchBar';
export type NewSelectProps<OptionType> = {
    /** Options to display in the dropdown menu */
    options: OptionType[] | SelectGroupType<OptionType>[];
    /** Key that will determine the value of the selected option */
    optionKeyName: keyof OptionType;
    /** Key that will determine what to display as an option */
    labelKeyName: keyof OptionType;
    /** The currently selected option state */
    selectedItem: OptionType;
    /** Function to call when the selected option changes */
    onChange: (option: OptionType) => void;
    /** Optional function to call when removing focus (onBlur) */
    onBlur?: (option: OptionType) => void;
    /** Optional function to call when opening the dropdown menu */
    onFocus?: () => void;
    /** Optional props to pass to the FormLabel component */
    labelProps?: Pick<React.ComponentProps<typeof FormLabel>, 'label' | 'rightLabel' | 'tooltip' | 'id'>;
    /** Overrides message displayed in dropdown when there are no options */
    noOptionsMessage?: string;
    /** Turns the select red if in an error state */
    error?: boolean;
    /** Turns the select gray and prevents interaction */
    disabled?: boolean;
    /** Optional prop to display loading state */
    loading?: boolean;
    /** Adds an asterisk to the label to indicate the field is required */
    required?: boolean;
    /** Optionally removes the border around the Select */
    noBorder?: boolean;
    /** Optionally add more configuration for the SearchBar */
    searchBarProps?: Omit<SearchBarProps, 'value' | 'onChange'> & {
        /** Optionally show the SearchBar at all times instead of the current conditional rendering */
        showSearchBar?: boolean;
        /** Optional function that will make a callout with the search `value` passed back */
        onChange?: (value: string) => void;
    };
    /** Opt out of using the portal for the menu. This is needed whenever the Select needs to be used in a Popover. */
    noMenuPortal?: boolean;
    /** Optional placeholder when there is no selected option */
    placeholder?: string;
    /** Optional prop to allow a Button in the footer */
    footerButtonProps?: {
        /** Function to call when creating a new option */
        callout: () => void;
        /** Text to display on the button */
        text: string;
    };
    /** Optionally override the width of the Select menu */
    menuWidth?: number;
    /** Optionally add configuration for infinite scroll */
    scrollProps?: {
        /** Flag to determine if the select has more data that needs to be called */
        hasMore: boolean;
        /** With pagination, new data needs to get called every time we reach the scrolling threshold. This is the function to get the next set of data. */
        getData: () => void;
    };
};
declare const NewSelect: <OptionType>({ options, labelProps, selectedItem, onChange, onBlur, onFocus, error, disabled, required, optionKeyName, labelKeyName, loading, noBorder, noOptionsMessage, searchBarProps, noMenuPortal, placeholder, footerButtonProps, menuWidth, scrollProps, }: NewSelectProps<OptionType>) => JSX.Element;
export default NewSelect;
