import { InputProps } from '../input';
import { InputValue } from '../input';
import { TagProps } from '../tag';
import { TNode } from '../common';
export interface TdTagInputProps {
    autoWidth?: boolean;
    clearable?: boolean;
    collapsedItems?: TNode<{
        value: TagInputValue;
        collapsedTags: TagInputValue;
        count: number;
    }>;
    disabled?: boolean;
    dragSort?: boolean;
    excessTagsDisplayType?: 'scroll' | 'break-line';
    inputProps?: InputProps;
    inputValue?: InputValue;
    defaultInputValue?: InputValue;
    label?: string | TNode;
    max?: number;
    minCollapsedNum?: number;
    placeholder?: string;
    readonly?: boolean;
    size?: 'small' | 'medium' | 'large';
    status?: 'success' | 'warning' | 'error' | 'default';
    suffix?: string | TNode;
    suffixIcon?: TNode;
    tag?: string | TNode<{
        value: string | number;
    }>;
    tagProps?: TagProps;
    tips?: string | TNode;
    value?: TagInputValue;
    defaultValue?: TagInputValue;
    valueDisplay?: string | TNode<{
        value: TagInputValue;
        onClose: (index: number, item?: any) => void;
    }>;
    onBlur?: (value: TagInputValue, context: {
        inputValue: InputValue;
        e: FocusEvent;
    }) => void;
    onChange?: (value: TagInputValue, context: TagInputChangeContext) => void;
    onClear?: (context: {
        e: MouseEvent;
    }) => void;
    onDragSort?: (context: TagInputDragSortContext) => void;
    onEnter?: (value: TagInputValue, context: {
        e: KeyboardEvent;
        inputValue: InputValue;
    }) => void;
    onFocus?: (value: TagInputValue, context: {
        inputValue: InputValue;
        e: FocusEvent;
    }) => void;
    onInputChange?: (value: InputValue, context?: InputValueChangeContext) => void;
    onMouseenter?: (context: {
        e: MouseEvent;
    }) => void;
    onMouseleave?: (context: {
        e: MouseEvent;
    }) => void;
    onPaste?: (context: {
        e: ClipboardEvent;
        pasteValue: string;
    }) => void;
    onRemove?: (context: TagInputRemoveContext) => void;
}
export declare type TagInputValue = Array<string | number>;
export interface TagInputChangeContext {
    trigger: TagInputTriggerSource;
    index?: number;
    item?: string | number;
    e?: MouseEvent | KeyboardEvent;
}
export declare type TagInputTriggerSource = 'enter' | 'tag-remove' | 'backspace' | 'clear';
export interface TagInputDragSortContext {
    newTags: TagInputValue;
    currentIndex: number;
    current: string | number;
    targetIndex: number;
    target: string | number;
}
export interface InputValueChangeContext {
    e?: InputEvent | MouseEvent | KeyboardEvent;
    trigger: 'input' | 'clear' | 'enter';
}
export interface TagInputRemoveContext {
    value: TagInputValue;
    index: number;
    item: string | number;
    e?: MouseEvent | KeyboardEvent;
    trigger: TagInputRemoveTrigger;
}
export declare type TagInputRemoveTrigger = 'tag-remove' | 'backspace';
interface DragSortContext<T> {
    currentIndex: number;
    current: T;
    targetIndex: number;
    target: T;
}
export interface DragSortProps<T> {
    sortOnDraggable: boolean;
    onDragSort?: (context: DragSortContext<T>) => void;
    onDragOverCheck?: {
        x?: boolean;
        targetClassNameRegExp?: RegExp;
    };
}
declare type DragFnType = (e?: DragEvent, index?: number, record?: any) => void;
interface DragSortInnerData {
    dragging?: boolean;
    onDragStart?: DragFnType;
    onDragOver?: DragFnType;
    onDrop?: DragFnType;
    onDragEnd?: DragFnType;
}
export interface DragProps {
    (index?: number, record?: any): {
        draggable: boolean;
        onDragstart?: DragFnType;
        onDragover?: DragFnType;
        onDrop?: DragFnType;
        onDragend?: DragFnType;
    };
}
export interface DragSortInnerProps extends DragSortInnerData {
    getDragProps?: DragProps;
}
export {};
