import { IconComponent, IconPropSize } from '@consta/icons/Icon';
import React from 'react';
import { PropForm, PropSize, PropStatus, PropView, RenderItemProps } from "../SelectComponents/types";
import { PropsWithHTMLAttributesAndRef } from "../../utils/types/PropsWithHTMLAttributes";
export declare type ComboboxItemDefault = {
    label: string;
    id: string | number;
    groupId?: string | number;
    disabled?: boolean;
};
export declare type ComboboxGroupDefault = {
    label: string;
    id: string | number;
};
declare type RenderValueProps<ITEM> = {
    item: ITEM;
    handleRemove?: (e: React.SyntheticEvent) => void;
};
export declare type ComboboxPropGetItemLabel<ITEM> = (item: ITEM) => string;
export declare type ComboboxPropGetItemKey<ITEM> = (item: ITEM) => string | number;
export declare type ComboboxPropGetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
export declare type ComboboxPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
export declare type ComboboxPropGetGroupKey<GROUP> = (group: GROUP) => string | number;
export declare type ComboboxPropGetGroupLabel<GROUP> = (group: GROUP) => string;
declare type ComboboxPropSearchFunction<ITEM> = (item: ITEM, searchValue: string) => boolean;
declare type ComboboxPropOnChange<ITEM, MULTIPLE extends boolean> = (value: (MULTIPLE extends true ? ITEM[] : ITEM) | null, props: {
    e: React.SyntheticEvent;
}) => void;
declare type ComboboxPropValue<ITEM, MULTIPLE extends boolean> = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined;
export declare type ComboboxPropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export declare type ComboboxPropRenderValue<ITEM> = (props: RenderValueProps<ITEM>) => React.ReactElement | null;
declare type ComboboxPropOnCreate = (label: string, props: {
    e: React.SyntheticEvent;
}) => void;
export declare type ComboboxProps<ITEM = ComboboxItemDefault, GROUP = ComboboxGroupDefault, MULTIPLE extends boolean = false> = PropsWithHTMLAttributesAndRef<{
    items: ITEM[];
    onChange: ComboboxPropOnChange<ITEM, MULTIPLE>;
    disabled?: boolean;
    form?: PropForm;
    dropdownForm?: 'default' | 'brick' | 'round';
    size?: PropSize;
    view?: PropView;
    placeholder?: string;
    ariaLabel?: string;
    status?: PropStatus;
    isLoading?: boolean;
    dropdownClassName?: string;
    dropdownRef?: React.Ref<HTMLDivElement>;
    name?: string;
    renderItem?: ComboboxPropRenderItem<ITEM>;
    renderValue?: ComboboxPropRenderValue<ITEM>;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    onCreate?: ComboboxPropOnCreate;
    inputRef?: React.Ref<HTMLInputElement>;
    labelForNotFound?: string;
    required?: boolean;
    labelForCreate?: string;
    labelForEmptyItems?: string;
    searchFunction?: ComboboxPropSearchFunction<ITEM>;
    searchValue?: string;
    multiple?: MULTIPLE;
    value?: ComboboxPropValue<ITEM, MULTIPLE>;
    groups?: GROUP[];
    getItemLabel?: ComboboxPropGetItemLabel<ITEM>;
    getItemKey?: ComboboxPropGetItemKey<ITEM>;
    getItemGroupKey?: ComboboxPropGetItemGroupKey<ITEM>;
    getItemDisabled?: ComboboxPropGetItemDisabled<ITEM>;
    getGroupLabel?: ComboboxPropGetGroupLabel<GROUP>;
    getGroupKey?: ComboboxPropGetGroupKey<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> & (MULTIPLE extends true ? {
    selectAll?: boolean;
    allSelectedAllLabel?: string;
} : {
    selectAll?: never;
    allSelectedAllLabel?: never;
}) & (ITEM extends {
    label: ComboboxItemDefault['label'];
} ? {} : {
    getItemLabel: ComboboxPropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: ComboboxItemDefault['id'];
} ? {} : {
    getItemKey: ComboboxPropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: ComboboxGroupDefault['label'];
} ? {} : {
    getGroupLabel: ComboboxPropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: ComboboxGroupDefault['id'];
} ? {} : {
    getGroupKey: ComboboxPropGetGroupKey<GROUP>;
});
export declare type ComboboxComponent = <ITEM = ComboboxItemDefault, GROUP = ComboboxGroupDefault, MULTIPLE extends boolean = false>(props: ComboboxProps<ITEM, GROUP, MULTIPLE>) => React.ReactElement | null;
export declare const defaultGetItemKey: ComboboxPropGetItemKey<ComboboxItemDefault>;
export declare const defaultGetItemLabel: ComboboxPropGetItemLabel<ComboboxItemDefault>;
export declare const defaultGetItemGroupKey: ComboboxPropGetItemGroupKey<ComboboxItemDefault>;
export declare const defaultGetItemDisabled: ComboboxPropGetItemDisabled<ComboboxItemDefault>;
export declare const defaultGetGroupKey: ComboboxPropGetGroupKey<ComboboxGroupDefault>;
export declare const defaultGetGroupLabel: ComboboxPropGetGroupLabel<ComboboxGroupDefault>;
export declare const isMultipleParams: <ITEM, GROUP>(params: ComboboxProps<ITEM, GROUP, boolean>) => params is ComboboxProps<ITEM, GROUP, true>;
export declare const isNotMultipleParams: <ITEM, GROUP>(params: ComboboxProps<ITEM, GROUP, boolean>) => params is ComboboxProps<ITEM, GROUP, false>;
export declare function withDefaultGetters<ITEM = ComboboxItemDefault, GROUP = ComboboxGroupDefault, MULTIPLE extends boolean = false>(props: ComboboxProps<ITEM, GROUP, MULTIPLE>): {
    items: ITEM[];
    onChange: ComboboxPropOnChange<ITEM, MULTIPLE>;
    disabled?: boolean | undefined;
    form?: "default" | "defaultClear" | "defaultBrick" | "brick" | "brickDefault" | "brickClear" | "brickRound" | "round" | "roundClear" | "roundBrick" | "clearRound" | "clearDefault" | "clearBrick" | "clearClear" | undefined;
    dropdownForm?: "default" | "brick" | "round" | undefined;
    size?: "s" | "m" | "xs" | "l" | undefined;
    view?: "default" | "clear" | undefined;
    placeholder?: string | undefined;
    ariaLabel?: string | undefined;
    status?: "alert" | "warning" | "success" | undefined;
    isLoading?: boolean | undefined;
    dropdownClassName?: string | undefined;
    dropdownRef?: React.Ref<HTMLDivElement> | undefined;
    name?: string | undefined;
    renderItem?: ComboboxPropRenderItem<ITEM> | undefined;
    renderValue?: ComboboxPropRenderValue<ITEM> | undefined;
    onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
    onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
    onCreate?: ComboboxPropOnCreate | undefined;
    inputRef?: React.Ref<HTMLInputElement> | undefined;
    labelForNotFound?: string | undefined;
    required?: boolean | undefined;
    labelForCreate?: string | undefined;
    labelForEmptyItems?: string | undefined;
    searchFunction?: ComboboxPropSearchFunction<ITEM> | undefined;
    searchValue?: string | undefined;
    multiple?: MULTIPLE | undefined;
    value?: ComboboxPropValue<ITEM, MULTIPLE>;
    groups?: GROUP[] | undefined;
    getItemLabel?: ComboboxPropGetItemLabel<ITEM> | undefined;
    getItemKey?: ComboboxPropGetItemKey<ITEM> | undefined;
    getItemGroupKey?: ComboboxPropGetItemGroupKey<ITEM> | undefined;
    getItemDisabled?: ComboboxPropGetItemDisabled<ITEM> | undefined;
    getGroupLabel?: ComboboxPropGetGroupLabel<GROUP> | undefined;
    getGroupKey?: ComboboxPropGetGroupKey<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"> & React.RefAttributes<HTMLDivElement> & (MULTIPLE extends true ? {
    selectAll?: boolean | undefined;
    allSelectedAllLabel?: string | undefined;
} : {
    selectAll?: undefined;
    allSelectedAllLabel?: undefined;
}) & (ITEM extends {
    label: string;
} ? {} : {
    getItemLabel: ComboboxPropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: string | number;
} ? {} : {
    getItemKey: ComboboxPropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: string;
} ? {} : {
    getGroupLabel: ComboboxPropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: string | number;
} ? {} : {
    getGroupKey: ComboboxPropGetGroupKey<GROUP>;
}) & {
    getItemLabel: ComboboxPropGetItemLabel<ComboboxItemDefault> | ComboboxPropGetItemLabel<ITEM>;
    getItemKey: ComboboxPropGetItemKey<ComboboxItemDefault> | ComboboxPropGetItemKey<ITEM>;
    getItemGroupKey: ComboboxPropGetItemGroupKey<ComboboxItemDefault> | ComboboxPropGetItemGroupKey<ITEM>;
    getItemDisabled: ComboboxPropGetItemDisabled<ComboboxItemDefault> | ComboboxPropGetItemDisabled<ITEM>;
    getGroupLabel: ComboboxPropGetGroupLabel<ComboboxGroupDefault> | ComboboxPropGetGroupLabel<GROUP>;
    getGroupKey: ComboboxPropGetGroupKey<ComboboxGroupDefault> | ComboboxPropGetGroupKey<GROUP>;
};
export declare const clearSizeMap: Record<PropSize, IconPropSize>;
export declare const iconSizeMap: Record<PropSize, IconPropSize>;
export {};
