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 SelectItemDefault = {
    label: string;
    id: string | number;
    groupId?: string | number;
    disabled?: boolean;
};
export declare type SelectGroupDefault = {
    label: string;
    id: string | number;
};
declare type SelectPropValue<ITEM> = ITEM | null | undefined;
declare type SelectRenderValueProps<ITEM> = {
    item: ITEM;
};
export declare type SelectPropGetItemLabel<ITEM> = (item: ITEM) => string;
export declare type SelectPropGetItemKey<ITEM> = (item: ITEM) => string | number;
export declare type SelectPropGetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
export declare type SelectPropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
export declare type SelectPropGetGroupKey<GROUP> = (group: GROUP) => string | number;
export declare type SelectPropGetGroupLabel<GROUP> = (group: GROUP) => string;
export declare type PropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export declare type PropRenderValue<ITEM> = (props: SelectRenderValueProps<ITEM>) => React.ReactElement | null;
export declare type SelectPropOnChange<ITEM> = (value: ITEM | null, props: {
    e: React.SyntheticEvent;
}) => void;
export declare type SelectProps<ITEM = SelectItemDefault, GROUP = SelectGroupDefault> = PropsWithHTMLAttributesAndRef<{
    items: ITEM[];
    onChange: SelectPropOnChange<ITEM>;
    disabled?: boolean;
    form?: PropForm;
    dropdownForm?: 'default' | 'brick' | 'round';
    size?: PropSize;
    view?: PropView;
    status?: PropStatus;
    focused?: boolean;
    placeholder?: string;
    ariaLabel?: string;
    dropdownClassName?: string;
    dropdownRef?: React.RefObject<HTMLDivElement>;
    required?: boolean;
    name?: string;
    isLoading?: boolean;
    labelForEmptyItems?: string;
    value?: SelectPropValue<ITEM>;
    renderItem?: PropRenderItem<ITEM>;
    renderValue?: PropRenderValue<ITEM>;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    inputRef?: React.RefObject<HTMLInputElement>;
    groups?: GROUP[];
    getItemLabel?: SelectPropGetItemLabel<ITEM>;
    getItemKey?: SelectPropGetItemKey<ITEM>;
    getItemGroupKey?: SelectPropGetItemGroupKey<ITEM>;
    getItemDisabled?: SelectPropGetItemDisabled<ITEM>;
    getGroupLabel?: SelectPropGetGroupLabel<GROUP>;
    getGroupKey?: SelectPropGetGroupKey<GROUP>;
    label?: string;
    labelIcon?: IconComponent;
    labelPosition?: 'top' | 'left';
    caption?: string;
    virtualScroll?: boolean;
    onScrollToBottom?: () => void;
    onDropdownOpen?: (isOpen: boolean) => void;
    dropdownOpen?: boolean;
    ignoreOutsideClicksRefs?: ReadonlyArray<React.RefObject<HTMLElement>>;
}, HTMLDivElement> & (ITEM extends {
    label: SelectItemDefault['label'];
} ? {} : {
    getItemLabel: SelectPropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: SelectItemDefault['id'];
} ? {} : {
    getItemKey: SelectPropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: SelectGroupDefault['label'];
} ? {} : {
    getGroupLabel: SelectPropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: SelectGroupDefault['id'];
} ? {} : {
    getGroupKey: SelectPropGetGroupKey<GROUP>;
});
export declare type SelectComponent = <ITEM = SelectItemDefault, GROUP = SelectGroupDefault>(props: SelectProps<ITEM, GROUP>) => React.ReactElement | null;
export declare const defaultGetItemKey: SelectPropGetItemKey<SelectItemDefault>;
export declare const defaultGetItemLabel: SelectPropGetItemLabel<SelectItemDefault>;
export declare const defaultGetItemGroupKey: SelectPropGetItemGroupKey<SelectItemDefault>;
export declare const defaultGetItemDisabled: SelectPropGetItemDisabled<SelectItemDefault>;
export declare const defaultGetGroupKey: SelectPropGetGroupKey<SelectGroupDefault>;
export declare const defaultGetGroupLabel: SelectPropGetGroupLabel<SelectGroupDefault>;
export declare function withDefaultGetters<ITEM, GROUP>(props: SelectProps<ITEM, GROUP>): {
    items: ITEM[];
    onChange: SelectPropOnChange<ITEM>;
    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;
    status?: "alert" | "warning" | "success" | undefined;
    focused?: boolean | undefined;
    placeholder?: string | undefined;
    ariaLabel?: string | undefined;
    dropdownClassName?: string | undefined;
    dropdownRef?: React.RefObject<HTMLDivElement> | undefined;
    required?: boolean | undefined;
    name?: string | undefined;
    isLoading?: boolean | undefined;
    labelForEmptyItems?: string | undefined;
    value?: SelectPropValue<ITEM>;
    renderItem?: PropRenderItem<ITEM> | undefined;
    renderValue?: PropRenderValue<ITEM> | undefined;
    onFocus?: React.FocusEventHandler<HTMLInputElement> | undefined;
    onBlur?: React.FocusEventHandler<HTMLInputElement> | undefined;
    inputRef?: React.RefObject<HTMLInputElement> | undefined;
    groups?: GROUP[] | undefined;
    getItemLabel?: SelectPropGetItemLabel<ITEM> | undefined;
    getItemKey?: SelectPropGetItemKey<ITEM> | undefined;
    getItemGroupKey?: SelectPropGetItemGroupKey<ITEM> | undefined;
    getItemDisabled?: SelectPropGetItemDisabled<ITEM> | undefined;
    getGroupLabel?: SelectPropGetGroupLabel<GROUP> | undefined;
    getGroupKey?: SelectPropGetGroupKey<GROUP> | undefined;
    label?: string | undefined;
    labelIcon?: IconComponent<"span"> | undefined;
    labelPosition?: "left" | "top" | undefined;
    caption?: string | undefined;
    virtualScroll?: boolean | undefined;
    onScrollToBottom?: (() => 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" | "required" | "size" | "status" | "css" | "inputRef" | "items" | "dropdownForm" | "focused" | "ariaLabel" | "dropdownClassName" | "dropdownRef" | "isLoading" | "labelForEmptyItems" | "renderItem" | "renderValue" | "groups" | "getItemLabel" | "getItemKey" | "getItemGroupKey" | "getItemDisabled" | "getGroupLabel" | "getGroupKey" | "labelIcon" | "labelPosition" | "onScrollToBottom" | "onDropdownOpen" | "dropdownOpen" | "ignoreOutsideClicksRefs" | "virtualScroll"> & React.RefAttributes<HTMLDivElement> & (ITEM extends {
    label: string;
} ? {} : {
    getItemLabel: SelectPropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: string | number;
} ? {} : {
    getItemKey: SelectPropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: string;
} ? {} : {
    getGroupLabel: SelectPropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: string | number;
} ? {} : {
    getGroupKey: SelectPropGetGroupKey<GROUP>;
}) & {
    getItemLabel: SelectPropGetItemLabel<SelectItemDefault> | SelectPropGetItemLabel<ITEM>;
    getItemKey: SelectPropGetItemKey<SelectItemDefault> | SelectPropGetItemKey<ITEM>;
    getItemGroupKey: SelectPropGetItemGroupKey<SelectItemDefault> | SelectPropGetItemGroupKey<ITEM>;
    getItemDisabled: SelectPropGetItemDisabled<SelectItemDefault> | SelectPropGetItemDisabled<ITEM>;
    getGroupLabel: SelectPropGetGroupLabel<SelectGroupDefault> | SelectPropGetGroupLabel<GROUP>;
    getGroupKey: SelectPropGetGroupKey<SelectGroupDefault> | SelectPropGetGroupKey<GROUP>;
};
export declare const iconSizeMap: Record<PropSize, IconPropSize>;
export {};
