import { IconComponent, IconPropSize } from '@consta/icons/Icon';
import React from 'react';
import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
import { PropForm, PropSize, PropStatus, PropView, RenderItemProps } from '../SelectComponentsDeprecated/types';
export type DefaultItem = {
    label: string;
    id: string | number;
    subLabel?: string;
    avatarUrl?: string;
    groupId?: string | number;
    disabled?: boolean;
};
export type DefaultGroup = {
    label: string;
    id: string | number;
};
type RenderValueProps<ITEM> = {
    item: ITEM;
    handleRemove?: (e: React.SyntheticEvent) => void;
};
export type PropGetItemLabel<ITEM> = (item: ITEM) => string;
export type PropGetItemSubLabel<ITEM> = (item: ITEM) => string | undefined;
export type PropGetItemAvatarUrl<ITEM> = (item: ITEM) => string | undefined;
export type PropGetItemKey<ITEM> = (item: ITEM) => string | number;
export type PropGetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
export type PropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
export type PropGetGroupKey<GROUP> = (group: GROUP) => string | number;
export type PropGetGroupLabel<GROUP> = (group: GROUP) => string;
type PropSearchFunction<ITEM> = (item: ITEM, searchValue: string) => boolean;
type PropOnChange<ITEM, MULTIPLE extends boolean> = (props: {
    value: (MULTIPLE extends true ? ITEM[] : ITEM) | null;
    e: React.SyntheticEvent;
}) => void;
type PropValue<ITEM, MULTIPLE extends boolean> = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined;
export type PropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export type PropRenderValue<ITEM> = (props: RenderValueProps<ITEM>) => React.ReactElement | null;
export type UserSelectProps<ITEM = DefaultItem, GROUP = DefaultGroup, 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?: PropRenderItem<ITEM>;
    renderValue?: PropRenderValue<ITEM>;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    onCreate?: (props: {
        e: React.SyntheticEvent;
        label: string;
    }) => void;
    inputRef?: React.RefObject<HTMLInputElement>;
    labelForNotFound?: string;
    labelForCreate?: string;
    labelForEmptyItems?: string;
    searchFunction?: PropSearchFunction<ITEM>;
    searchValue?: string;
    multiple?: MULTIPLE;
    value?: PropValue<ITEM, MULTIPLE>;
    onChange: PropOnChange<ITEM, MULTIPLE>;
    groups?: GROUP[];
    getItemLabel?: PropGetItemLabel<ITEM>;
    getItemSubLabel?: PropGetItemSubLabel<ITEM>;
    getItemAvatarUrl?: PropGetItemAvatarUrl<ITEM>;
    getItemKey?: PropGetItemKey<ITEM>;
    getItemGroupKey?: PropGetItemGroupKey<ITEM>;
    getItemDisabled?: PropGetItemDisabled<ITEM>;
    getGroupLabel?: PropGetGroupLabel<GROUP>;
    getGroupKey?: PropGetGroupKey<GROUP>;
    label?: string;
    labelIcon?: IconComponent;
    caption?: string;
    labelPosition?: 'top' | 'left';
}, HTMLDivElement> & (ITEM extends {
    label: DefaultItem['label'];
} ? {} : {
    getItemLabel: PropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: DefaultItem['id'];
} ? {} : {
    getItemKey: PropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: DefaultGroup['label'];
} ? {} : {
    getGroupLabel: PropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: DefaultGroup['id'];
} ? {} : {
    getGroupKey: PropGetGroupKey<GROUP>;
});
export type UserSelectComponent = <ITEM = DefaultItem, GROUP = DefaultGroup, MULTIPLE extends boolean = false>(props: UserSelectProps<ITEM, GROUP, MULTIPLE>) => React.ReactElement | null;
export declare const defaultGetItemKey: PropGetItemKey<DefaultItem>;
export declare const defaultGetItemLabel: PropGetItemLabel<DefaultItem>;
export declare const defaultGetItemSubLabel: PropGetItemSubLabel<DefaultItem>;
export declare const defaultGetItemAvatarUrl: PropGetItemAvatarUrl<DefaultItem>;
export declare const defaultGetItemGroupKey: PropGetItemGroupKey<DefaultItem>;
export declare const defaultGetItemDisabled: PropGetItemDisabled<DefaultItem>;
export declare const defaultGetGroupKey: PropGetGroupKey<DefaultGroup>;
export declare const defaultGetGroupLabel: PropGetGroupLabel<DefaultGroup>;
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 = DefaultItem, GROUP = DefaultGroup, 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?: PropRenderItem<ITEM> | undefined;
    renderValue?: PropRenderValue<ITEM> | undefined;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    onCreate?: (props: {
        e: React.SyntheticEvent;
        label: string;
    }) => void;
    inputRef?: React.RefObject<HTMLInputElement>;
    labelForNotFound?: string;
    labelForCreate?: string;
    labelForEmptyItems?: string;
    searchFunction?: PropSearchFunction<ITEM> | undefined;
    searchValue?: string;
    multiple?: MULTIPLE | undefined;
    value?: PropValue<ITEM, MULTIPLE>;
    onChange: PropOnChange<ITEM, MULTIPLE>;
    groups?: GROUP[] | undefined;
    getItemLabel?: PropGetItemLabel<ITEM> | undefined;
    getItemSubLabel?: PropGetItemSubLabel<ITEM> | undefined;
    getItemAvatarUrl?: PropGetItemAvatarUrl<ITEM> | undefined;
    getItemKey?: PropGetItemKey<ITEM> | undefined;
    getItemGroupKey?: PropGetItemGroupKey<ITEM> | undefined;
    getItemDisabled?: PropGetItemDisabled<ITEM> | undefined;
    getGroupLabel?: PropGetGroupLabel<GROUP> | undefined;
    getGroupKey?: PropGetGroupKey<GROUP> | undefined;
    label?: string;
    labelIcon?: IconComponent;
    caption?: string;
    labelPosition?: "top" | "left";
} & 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" | "labelForCreate" | "searchFunction" | "searchValue" | "labelForNotFound" | "onCreate" | "getItemSubLabel" | "getItemAvatarUrl"> & React.RefAttributes<HTMLDivElement> & (ITEM extends {
    label: DefaultItem["label"];
} ? {} : {
    getItemLabel: PropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: DefaultItem["id"];
} ? {} : {
    getItemKey: PropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: DefaultGroup["label"];
} ? {} : {
    getGroupLabel: PropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: DefaultGroup["id"];
} ? {} : {
    getGroupKey: PropGetGroupKey<GROUP>;
}) & {
    getItemLabel: PropGetItemLabel<DefaultItem> | PropGetItemLabel<ITEM>;
    getItemKey: PropGetItemKey<DefaultItem> | PropGetItemKey<ITEM>;
    getItemGroupKey: PropGetItemGroupKey<DefaultItem> | PropGetItemGroupKey<ITEM>;
    getItemDisabled: PropGetItemDisabled<DefaultItem> | PropGetItemDisabled<ITEM>;
    getGroupLabel: PropGetGroupLabel<DefaultGroup> | PropGetGroupLabel<GROUP>;
    getGroupKey: PropGetGroupKey<DefaultGroup> | PropGetGroupKey<GROUP>;
    getItemSubLabel: PropGetItemSubLabel<DefaultItem> | PropGetItemSubLabel<ITEM>;
    getItemAvatarUrl: PropGetItemAvatarUrl<DefaultItem> | PropGetItemAvatarUrl<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 {};
