import { IconComponent, IconPropSize } from '@consta/icons/Icon';
import React from 'react';
import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
import { PropForm, PropSize, PropStatus, PropView, RenderItemProps } from '../SelectComponents/types';
export declare type UserSelectItemDefault = {
    label: string;
    id: string | number;
    subLabel?: string;
    avatarUrl?: string;
    groupId?: string | number;
    disabled?: boolean;
};
export declare type UserSelectGroupDefault = {
    label: string;
    id: string | number;
};
declare type UserSelectRenderValueProps<ITEM> = {
    item: ITEM;
    handleRemove?: (e: React.SyntheticEvent) => void;
};
export declare type UserSelectPropGetItemLabel<ITEM> = (item: ITEM) => string;
export declare type UserSelectPropGetItemSubLabel<ITEM> = (item: ITEM) => string | undefined;
export declare type UserSelectPropGetItemAvatarUrl<ITEM> = (item: ITEM) => string | undefined;
export declare type UserSelectPropGetItemKey<ITEM> = (item: ITEM) => string | number;
export declare type UserSelectPropGetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
export declare type UserSelectPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
export declare type UserSelectPropGetGroupKey<GROUP> = (group: GROUP) => string | number;
export declare type UserSelectPropGetGroupLabel<GROUP> = (group: GROUP) => string;
declare type UserSelectPropSearchFunction<ITEM> = (item: ITEM, searchValue: string) => boolean;
declare type UserSelectPropOnChange<ITEM, MULTIPLE extends boolean> = (value: (MULTIPLE extends true ? ITEM[] : ITEM) | null, props: {
    e: React.SyntheticEvent;
}) => void;
declare type UserSelectPropValue<ITEM, MULTIPLE extends boolean> = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined;
export declare type UserSelectPropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export declare type UserSelectPropRenderValue<ITEM> = (props: UserSelectRenderValueProps<ITEM>) => React.ReactElement | null;
export declare type UserSelectProps<ITEM = UserSelectItemDefault, GROUP = UserSelectGroupDefault, MULTIPLE extends boolean = false> = PropsWithHTMLAttributesAndRef<{
    disabled?: boolean;
    form?: PropForm;
    size?: Exclude<PropSize, 'xs'>;
    view?: PropView;
    dropdownForm?: 'default' | 'brick' | 'round';
    placeholder?: string;
    ariaLabel?: string;
    dropdownClassName?: string;
    status?: PropStatus;
    dropdownRef?: React.RefObject<HTMLDivElement>;
    name?: string;
    items: ITEM[];
    required?: boolean;
    isLoading?: boolean;
    renderItem?: UserSelectPropRenderItem<ITEM>;
    renderValue?: UserSelectPropRenderValue<ITEM>;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    onCreate?: (label: string, props: {
        e: React.SyntheticEvent;
    }) => void;
    inputRef?: React.RefObject<HTMLInputElement>;
    labelForNotFound?: string;
    labelForCreate?: string;
    labelForEmptyItems?: string;
    searchFunction?: UserSelectPropSearchFunction<ITEM>;
    searchValue?: string;
    multiple?: MULTIPLE;
    value?: UserSelectPropValue<ITEM, MULTIPLE>;
    onChange: UserSelectPropOnChange<ITEM, MULTIPLE>;
    groups?: GROUP[];
    getItemLabel?: UserSelectPropGetItemLabel<ITEM>;
    getItemSubLabel?: UserSelectPropGetItemSubLabel<ITEM>;
    getItemAvatarUrl?: UserSelectPropGetItemAvatarUrl<ITEM>;
    getItemKey?: UserSelectPropGetItemKey<ITEM>;
    getItemGroupKey?: UserSelectPropGetItemGroupKey<ITEM>;
    getItemDisabled?: UserSelectPropGetItemDisabled<ITEM>;
    getGroupLabel?: UserSelectPropGetGroupLabel<GROUP>;
    getGroupKey?: UserSelectPropGetGroupKey<GROUP>;
    label?: string;
    labelIcon?: IconComponent;
    caption?: string;
    labelPosition?: 'top' | 'left';
    virtualScroll?: boolean;
    onScrollToBottom?: () => void;
    onSearchValueChange?: (value: string) => void;
    onDropdownOpen?: (isOpen: boolean) => void;
    dropdownOpen?: boolean;
    ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;
}, HTMLDivElement> & (ITEM extends {
    label: UserSelectItemDefault['label'];
} ? {} : {
    getItemLabel: UserSelectPropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: UserSelectItemDefault['id'];
} ? {} : {
    getItemKey: UserSelectPropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: UserSelectGroupDefault['label'];
} ? {} : {
    getGroupLabel: UserSelectPropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: UserSelectGroupDefault['id'];
} ? {} : {
    getGroupKey: UserSelectPropGetGroupKey<GROUP>;
});
export declare type UserSelectComponent = <ITEM = UserSelectItemDefault, GROUP = UserSelectGroupDefault, MULTIPLE extends boolean = false>(props: UserSelectProps<ITEM, GROUP, MULTIPLE>) => React.ReactElement | null;
export declare const defaultGetItemKey: UserSelectPropGetItemKey<UserSelectItemDefault>;
export declare const defaultGetItemLabel: UserSelectPropGetItemLabel<UserSelectItemDefault>;
export declare const defaultGetItemSubLabel: UserSelectPropGetItemSubLabel<UserSelectItemDefault>;
export declare const defaultGetItemAvatarUrl: UserSelectPropGetItemAvatarUrl<UserSelectItemDefault>;
export declare const defaultGetItemGroupKey: UserSelectPropGetItemGroupKey<UserSelectItemDefault>;
export declare const defaultGetItemDisabled: UserSelectPropGetItemDisabled<UserSelectItemDefault>;
export declare const defaultGetGroupKey: UserSelectPropGetGroupKey<UserSelectGroupDefault>;
export declare const defaultGetGroupLabel: UserSelectPropGetGroupLabel<UserSelectGroupDefault>;
export declare const isMultipleParams: <ITEM, GROUP>(params: UserSelectProps<ITEM, GROUP, boolean>) => params is UserSelectProps<ITEM, GROUP, true>;
export declare const isNotMultipleParams: <ITEM, GROUP>(params: UserSelectProps<ITEM, GROUP, boolean>) => params is UserSelectProps<ITEM, GROUP, false>;
export declare function withDefaultGetters<ITEM = UserSelectItemDefault, GROUP = UserSelectGroupDefault, MULTIPLE extends boolean = false>(props: UserSelectProps<ITEM, GROUP, MULTIPLE>): {
    disabled?: boolean | undefined;
    form?: "default" | "defaultClear" | "defaultBrick" | "brick" | "brickDefault" | "brickClear" | "brickRound" | "round" | "roundClear" | "roundBrick" | "clearRound" | "clearDefault" | "clearBrick" | "clearClear" | undefined;
    size?: "s" | "m" | "l" | undefined;
    view?: "default" | "clear" | undefined;
    dropdownForm?: "default" | "brick" | "round" | undefined;
    placeholder?: string | undefined;
    ariaLabel?: string | undefined;
    dropdownClassName?: string | undefined;
    status?: "alert" | "warning" | "success" | undefined;
    dropdownRef?: React.RefObject<HTMLDivElement> | undefined;
    name?: string | undefined;
    items: ITEM[];
    required?: boolean | undefined;
    isLoading?: boolean | undefined;
    renderItem?: UserSelectPropRenderItem<ITEM> | undefined;
    renderValue?: UserSelectPropRenderValue<ITEM> | undefined;
    onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
    onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
    onCreate?: ((label: string, props: {
        e: React.SyntheticEvent<Element, Event>;
    }) => void) | undefined;
    inputRef?: React.RefObject<HTMLInputElement> | undefined;
    labelForNotFound?: string | undefined;
    labelForCreate?: string | undefined;
    labelForEmptyItems?: string | undefined;
    searchFunction?: UserSelectPropSearchFunction<ITEM> | undefined;
    searchValue?: string | undefined;
    multiple?: MULTIPLE | undefined;
    value?: UserSelectPropValue<ITEM, MULTIPLE>;
    onChange: UserSelectPropOnChange<ITEM, MULTIPLE>;
    groups?: GROUP[] | undefined;
    getItemLabel?: UserSelectPropGetItemLabel<ITEM> | undefined;
    getItemSubLabel?: UserSelectPropGetItemSubLabel<ITEM> | undefined;
    getItemAvatarUrl?: UserSelectPropGetItemAvatarUrl<ITEM> | undefined;
    getItemKey?: UserSelectPropGetItemKey<ITEM> | undefined;
    getItemGroupKey?: UserSelectPropGetItemGroupKey<ITEM> | undefined;
    getItemDisabled?: UserSelectPropGetItemDisabled<ITEM> | undefined;
    getGroupLabel?: UserSelectPropGetGroupLabel<GROUP> | undefined;
    getGroupKey?: UserSelectPropGetGroupKey<GROUP> | undefined;
    label?: string | undefined;
    labelIcon?: IconComponent<"span"> | undefined;
    caption?: string | undefined;
    labelPosition?: "left" | "top" | undefined;
    virtualScroll?: boolean | undefined;
    onScrollToBottom?: (() => void) | undefined;
    onSearchValueChange?: ((value: string) => void) | undefined;
    onDropdownOpen?: ((isOpen: boolean) => void) | undefined;
    dropdownOpen?: boolean | undefined;
    ignoreOutsideClicksRefs?: readonly React.RefObject<HTMLElement>[] | undefined;
} & Omit<React.HTMLAttributes<HTMLDivElement>, "caption" | "form" | "label" | "view" | "name" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "disabled" | "value" | "multiple" | "required" | "size" | "status" | "css" | "inputRef" | "items" | "dropdownForm" | "ariaLabel" | "dropdownClassName" | "dropdownRef" | "isLoading" | "labelForEmptyItems" | "renderItem" | "renderValue" | "groups" | "getItemLabel" | "getItemKey" | "getItemGroupKey" | "getItemDisabled" | "getGroupLabel" | "getGroupKey" | "labelIcon" | "labelPosition" | "onScrollToBottom" | "labelForCreate" | "searchFunction" | "searchValue" | "onDropdownOpen" | "onSearchValueChange" | "dropdownOpen" | "ignoreOutsideClicksRefs" | "labelForNotFound" | "virtualScroll" | "onCreate" | "getItemSubLabel" | "getItemAvatarUrl"> & React.RefAttributes<HTMLDivElement> & (ITEM extends {
    label: string;
} ? {} : {
    getItemLabel: UserSelectPropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: string | number;
} ? {} : {
    getItemKey: UserSelectPropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: string;
} ? {} : {
    getGroupLabel: UserSelectPropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: string | number;
} ? {} : {
    getGroupKey: UserSelectPropGetGroupKey<GROUP>;
}) & {
    getItemLabel: UserSelectPropGetItemLabel<UserSelectItemDefault> | UserSelectPropGetItemLabel<ITEM>;
    getItemKey: UserSelectPropGetItemKey<UserSelectItemDefault> | UserSelectPropGetItemKey<ITEM>;
    getItemGroupKey: UserSelectPropGetItemGroupKey<UserSelectItemDefault> | UserSelectPropGetItemGroupKey<ITEM>;
    getItemDisabled: UserSelectPropGetItemDisabled<UserSelectItemDefault> | UserSelectPropGetItemDisabled<ITEM>;
    getGroupLabel: UserSelectPropGetGroupLabel<UserSelectGroupDefault> | UserSelectPropGetGroupLabel<GROUP>;
    getGroupKey: UserSelectPropGetGroupKey<UserSelectGroupDefault> | UserSelectPropGetGroupKey<GROUP>;
    getItemSubLabel: UserSelectPropGetItemSubLabel<UserSelectItemDefault> | UserSelectPropGetItemSubLabel<ITEM>;
    getItemAvatarUrl: UserSelectPropGetItemAvatarUrl<UserSelectItemDefault> | UserSelectPropGetItemAvatarUrl<ITEM>;
};
export declare const searchCompare: (searchValue: string, compare?: string) => boolean;
export declare const clearSizeMap: Record<PropSize, IconPropSize>;
export declare const iconSizeMap: Record<PropSize, IconPropSize>;
export {};
