import type { InputProps, InputValue } from '../input';
import type { PopupProps, PopupVisibleChangeContext } from '../popup';
import type { SelectInputProps, SelectInputValueChangeContext } from '../select-input';
import type { TagInputProps } from '../tag-input';
import type { TagProps } from '../tag';
import type { LNode, SizeType, TScroll } from '../../common';
export interface TypeSelectProps<T extends SelectOption = SelectOption> {
    autoWidth?: boolean;
    borderless?: boolean;
    clearable?: boolean;
    collapsedItems?: LNode<{
        value: T[];
        collapsedSelectedItems: T[];
        count: number;
    }>;
    creatable?: boolean;
    disabled?: boolean;
    empty?: string | LNode;
    filter?: (filterWords: string, option: T) => boolean | Promise<boolean>;
    filterable?: boolean;
    inputProps?: InputProps;
    inputValue?: InputValue;
    defaultInputValue?: InputValue;
    keys?: SelectKeysType;
    loading?: boolean;
    loadingText?: string | LNode;
    max?: number;
    minCollapsedNum?: number;
    multiple?: boolean;
    options?: Array<T>;
    panelBottomContent?: string | LNode;
    panelTopContent?: string | LNode;
    placeholder?: string;
    popupProps?: PopupProps;
    popupVisible?: boolean;
    defaultPopupVisible?: boolean;
    prefixIcon?: LNode;
    readonly?: boolean;
    reserveKeyword?: boolean;
    scroll?: TScroll;
    selectInputProps?: SelectInputProps;
    showArrow?: boolean;
    size?: SizeType;
    status?: 'default' | 'success' | 'warning' | 'error';
    tagInputProps?: TagInputProps;
    tagProps?: TagProps;
    tips?: string | LNode;
    value?: SelectValue;
    defaultValue?: SelectValue;
    valueDisplay?: string | LNode<{
        value: SelectValue;
        onClose: (index: number, item?: any) => void;
    }>;
    valueType?: 'value' | 'object';
    onBlur?: (context: {
        value: SelectValue;
        e: FocusEvent | KeyboardEvent;
    }) => void;
    onChange?: (value: SelectValue, context: {
        option?: T;
        selectedOptions: T[];
        trigger: SelectValueChangeTrigger;
        e?: MouseEvent | KeyboardEvent;
    }) => void;
    onClear?: (context: {
        e: MouseEvent;
    }) => void;
    onCreate?: (value: string | number) => void;
    onEnter?: (context: {
        inputValue: string;
        e: KeyboardEvent;
        value: SelectValue;
    }) => void;
    onFocus?: (context: {
        value: SelectValue;
        e: FocusEvent | KeyboardEvent;
    }) => void;
    onInputChange?: (value: InputValue, context?: SelectInputValueChangeContext) => void;
    onPopupVisibleChange?: (visible: boolean, context: PopupVisibleChangeContext) => void;
    onRemove?: (options: SelectRemoveContext<T>) => void;
    onSearch?: (filterWords: string) => void;
}
export interface TypeOptionProps {
    checkAll?: boolean;
    content?: string | LNode;
    default?: string | LNode;
    disabled?: boolean;
    label?: string;
    value?: string | number;
}
export interface TypeOptionGroupProps {
    divider?: boolean;
    label?: string;
}
export interface SelectKeysType {
    value?: string;
    label?: string;
}
export type SelectValue<T extends SelectOption = SelectOption> = string | number | T | Array<SelectValue<T>>;
export type SelectValueChangeTrigger = 'clear' | 'tag-remove' | 'backspace' | 'check' | 'uncheck';
export interface SelectRemoveContext<T> {
    value: string | number;
    data: T;
    e: MouseEvent | KeyboardEvent;
}
export type SelectOption = TypeOptionProps | SelectOptionGroup;
export interface SelectOptionGroup extends TypeOptionGroupProps {
    group: string;
    children: Array<TypeOptionProps>;
}
