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 type UserSelectItemDefault = {
    label: string;
    id: string | number;
    subLabel?: string;
    avatarUrl?: string;
    groupId?: string | number;
    disabled?: boolean;
};
export type UserSelectGroupDefault = {
    label: string;
    id: string | number;
};
type UserSelectRenderValueProps<ITEM> = {
    item: ITEM;
    handleRemove?: (e: React.SyntheticEvent) => void;
};
export type UserSelectPropGetItemLabel<ITEM> = (item: ITEM) => string;
export type UserSelectPropGetItemSubLabel<ITEM> = (item: ITEM) => string | undefined;
export type UserSelectPropGetItemAvatarUrl<ITEM> = (item: ITEM) => string | undefined;
export type UserSelectPropGetItemKey<ITEM> = (item: ITEM) => string | number;
export type UserSelectPropGetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
export type UserSelectPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
export type UserSelectPropGetGroupKey<GROUP> = (group: GROUP) => string | number;
export type UserSelectPropGetGroupLabel<GROUP> = (group: GROUP) => string;
export type UserSelectPropSearchFunction<ITEM> = (item: ITEM, searchValue: string) => boolean;
type UserSelectPropOnChange<ITEM, MULTIPLE extends boolean> = (value: (MULTIPLE extends true ? ITEM[] : ITEM) | null, props: {
    e: React.SyntheticEvent;
}) => void;
type UserSelectPropValue<ITEM, MULTIPLE extends boolean> = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined;
export type UserSelectPropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export type UserSelectPropRenderValue<ITEM> = (props: UserSelectRenderValueProps<ITEM>) => React.ReactElement | null;
export 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?: (length: number) => 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 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;
    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> | undefined;
    renderValue?: UserSelectPropRenderValue<ITEM> | undefined;
    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> | undefined;
    searchValue?: string;
    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;
    labelIcon?: IconComponent;
    caption?: string;
    labelPosition?: "top" | "left";
    virtualScroll?: boolean;
    onScrollToBottom?: (length: number) => void;
    onSearchValueChange?: (value: string) => void;
    onDropdownOpen?: (isOpen: boolean) => void;
    dropdownOpen?: boolean;
    ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;
} & Omit<React.HTMLAttributes<HTMLDivElement>, "css" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "size" | "view" | "caption" | "form" | "label" | "status" | "name" | "disabled" | "value" | "multiple" | "required" | "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: 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>;
}) & {
    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 {};
