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;
    groupId?: string | number;
    disabled?: boolean;
};
export type DefaultGroup = {
    label: string;
    id: string | number;
};
type PropValue<ITEM> = ITEM | null | undefined;
type RenderValueProps<ITEM> = {
    item: ITEM;
};
export type PropGetItemLabel<ITEM> = (item: ITEM) => string;
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;
export type PropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export type PropRenderValue<ITEM> = (props: RenderValueProps<ITEM>) => React.ReactElement | null;
export type SelectProps<ITEM = DefaultItem, GROUP = DefaultGroup> = PropsWithHTMLAttributesAndRef<{
    items: ITEM[];
    onChange: (props: {
        value: ITEM | null;
        e: React.SyntheticEvent;
    }) => void;
    disabled?: boolean;
    form?: PropForm;
    dropdownForm?: 'default' | 'brick' | 'round';
    size?: PropSize;
    view?: PropView;
    status?: PropStatus;
    focused?: boolean;
    multiple?: boolean;
    placeholder?: string;
    ariaLabel?: string;
    dropdownClassName?: string;
    dropdownRef?: React.RefObject<HTMLDivElement>;
    required?: boolean;
    name?: string;
    isLoading?: boolean;
    labelForEmptyItems?: string;
    value?: PropValue<ITEM>;
    renderItem?: PropRenderItem<ITEM>;
    renderValue?: PropRenderValue<ITEM>;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    inputRef?: React.RefObject<HTMLInputElement>;
    groups?: GROUP[];
    getItemLabel?: PropGetItemLabel<ITEM>;
    getItemKey?: PropGetItemKey<ITEM>;
    getItemGroupKey?: PropGetItemGroupKey<ITEM>;
    getItemDisabled?: PropGetItemDisabled<ITEM>;
    getGroupLabel?: PropGetGroupLabel<GROUP>;
    getGroupKey?: PropGetGroupKey<GROUP>;
    label?: string;
    labelIcon?: IconComponent;
    labelPosition?: 'top' | 'left';
    caption?: string;
}, 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 SelectComponent = <ITEM = DefaultItem, GROUP = DefaultGroup>(props: SelectProps<ITEM, GROUP>) => React.ReactElement | null;
export declare const defaultGetItemKey: PropGetItemKey<DefaultItem>;
export declare const defaultGetItemLabel: PropGetItemLabel<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 function withDefaultGetters<ITEM, GROUP>(props: SelectProps<ITEM, GROUP>): {
    items: ITEM[];
    onChange: (props: {
        value: ITEM | null;
        e: React.SyntheticEvent;
    }) => void;
    disabled?: boolean;
    form?: PropForm;
    dropdownForm?: "default" | "brick" | "round";
    size?: PropSize;
    view?: PropView;
    status?: PropStatus;
    focused?: boolean;
    multiple?: boolean;
    placeholder?: string;
    ariaLabel?: string;
    dropdownClassName?: string;
    dropdownRef?: React.RefObject<HTMLDivElement>;
    required?: boolean;
    name?: string;
    isLoading?: boolean;
    labelForEmptyItems?: string;
    value?: PropValue<ITEM>;
    renderItem?: PropRenderItem<ITEM> | undefined;
    renderValue?: PropRenderValue<ITEM> | undefined;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    inputRef?: React.RefObject<HTMLInputElement>;
    groups?: GROUP[] | undefined;
    getItemLabel?: PropGetItemLabel<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;
    labelPosition?: "top" | "left";
    caption?: string;
} & Omit<React.HTMLAttributes<HTMLDivElement>, "css" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "size" | "view" | "caption" | "form" | "label" | "status" | "name" | "disabled" | "value" | "multiple" | "required" | "inputRef" | "items" | "dropdownForm" | "focused" | "ariaLabel" | "dropdownClassName" | "dropdownRef" | "isLoading" | "labelForEmptyItems" | "renderItem" | "renderValue" | "groups" | "getItemLabel" | "getItemKey" | "getItemGroupKey" | "getItemDisabled" | "getGroupLabel" | "getGroupKey" | "labelIcon" | "labelPosition"> & 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>;
};
export declare const iconSizeMap: Record<PropSize, IconPropSize>;
export {};
