import React from 'react';
import { PropsWithHTMLAttributesAndRef } from '../../utils/types/PropsWithHTMLAttributes';
import { PropForm, PropSize, PropView, RenderItemProps } from '../SelectComponents/types';
export declare type DefaultItem = {
    label: string;
    id: string | number;
    groupId?: string | number;
    disabled?: boolean;
};
export declare type DefaultGroup = {
    label: string;
    id: string | number;
};
declare type RenderValueProps<ITEM> = {
    item: ITEM;
    handleRemove?: (e: React.SyntheticEvent) => void;
};
export declare type PropGetItemLabel<ITEM> = (item: ITEM) => string;
export declare type PropGetItemKey<ITEM> = (item: ITEM) => string | number;
export declare type PropGetItemGroupKey<ITEM> = (item: ITEM) => string | number | undefined;
export declare type PropGetItemDisabled<ITEM> = (item: ITEM) => boolean | undefined;
export declare type PropGetGroupKey<GROUP> = (group: GROUP) => string | number;
export declare type PropGetGroupLabel<GROUP> = (group: GROUP) => string;
declare type PropSearchFunction<ITEM> = (item: ITEM, searchValue: string) => boolean;
declare type PropOnChange<ITEM, MULTIPLE extends boolean> = (props: {
    value: (MULTIPLE extends true ? ITEM[] : ITEM) | null;
    e: React.SyntheticEvent;
}) => void;
declare type PropValue<ITEM, MULTIPLE extends boolean> = (MULTIPLE extends true ? ITEM[] : ITEM) | null | undefined;
export declare type PropRenderItem<ITEM> = (props: RenderItemProps<ITEM>) => React.ReactElement | null;
export declare type PropRenderValue<ITEM> = (props: RenderValueProps<ITEM>) => React.ReactElement | null;
export declare type ComboboxProps<ITEM = DefaultItem, GROUP = DefaultGroup, MULTIPLE extends boolean = false> = PropsWithHTMLAttributesAndRef<{
    items: ITEM[];
    moreItems: ITEM[];
    onChange: PropOnChange<ITEM, MULTIPLE>;
    disabled?: boolean;
    form?: PropForm;
    size?: Exclude<PropSize, 'xs'>;
    view?: PropView;
    placeholder?: string;
    ariaLabel?: string;
    dropdownClassName?: string;
    dropdownView?: string;
    dropdownRef?: React.RefObject<HTMLDivElement>;
    name?: string;
    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;
    searchFunction?: PropSearchFunction<ITEM>;
    multiple?: MULTIPLE;
    groupValues?: boolean;
    value?: PropValue<ITEM, MULTIPLE>;
    groups?: GROUP[];
    getItemLabel?: PropGetItemLabel<ITEM>;
    getItemKey?: PropGetItemKey<ITEM>;
    getItemGroupKey?: PropGetItemGroupKey<ITEM>;
    getItemDisabled?: PropGetItemDisabled<ITEM>;
    getGroupLabel?: PropGetGroupLabel<GROUP>;
    getGroupKey?: PropGetGroupKey<GROUP>;
}, 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 declare type ComboboxComponent = <ITEM = DefaultItem, GROUP = DefaultGroup, MULTIPLE extends boolean = false>(props: ComboboxProps<ITEM, GROUP, MULTIPLE>) => 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 const isGroupValuesParams: <ITEM, GROUP>(params: ComboboxProps<ITEM, GROUP, boolean>) => params is ComboboxProps<ITEM, GROUP, true>;
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 = DefaultItem, GROUP = DefaultGroup, MULTIPLE extends boolean = false>(props: ComboboxProps<ITEM, GROUP, MULTIPLE>): {
    items: ITEM[];
    moreItems: ITEM[];
    onChange: PropOnChange<ITEM, MULTIPLE>;
    disabled?: boolean;
    form?: "round" | "default" | "brick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "defaultBrick" | "brickDefault" | "brickClear" | "clearBrick" | "clearClear";
    size?: "s" | "m" | "l";
    view?: "default" | "clear" | "outline";
    placeholder?: string;
    ariaLabel?: string;
    dropdownClassName?: string;
    dropdownView?: string;
    dropdownRef?: React.RefObject<HTMLDivElement>;
    name?: string;
    renderItem?: PropRenderItem<ITEM>;
    renderValue?: PropRenderValue<ITEM>;
    onFocus?: React.FocusEventHandler<HTMLInputElement>;
    onBlur?: React.FocusEventHandler<HTMLInputElement>;
    onCreate?: (props: {
        e: React.SyntheticEvent<Element, Event>;
        label: string;
    }) => void;
    inputRef?: React.RefObject<HTMLInputElement>;
    labelForNotFound?: string;
    labelForCreate?: string;
    searchFunction?: PropSearchFunction<ITEM>;
    multiple?: MULTIPLE;
    groupValues?: boolean;
    value?: MULTIPLE extends true ? ITEM[] : ITEM;
    groups?: GROUP[];
    getItemLabel?: PropGetItemLabel<ITEM>;
    getItemKey?: PropGetItemKey<ITEM>;
    getItemGroupKey?: PropGetItemGroupKey<ITEM>;
    getItemDisabled?: PropGetItemDisabled<ITEM>;
    getGroupLabel?: PropGetGroupLabel<GROUP>;
    getGroupKey?: PropGetGroupKey<GROUP>;
} & Omit<React.HTMLAttributes<HTMLDivElement>, "css" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "view" | "size" | "form" | "name" | "disabled" | "value" | "multiple" | "inputRef" | "items" | "ariaLabel" | "dropdownClassName" | "dropdownRef" | "renderItem" | "renderValue" | "groups" | "getItemLabel" | "getItemKey" | "getItemGroupKey" | "getItemDisabled" | "getGroupLabel" | "getGroupKey" | "labelForCreate" | "moreItems" | "dropdownView" | "onCreate" | "labelForNotFound" | "searchFunction" | "groupValues"> & React.RefAttributes<HTMLDivElement> & (ITEM extends {
    label: string;
} ? {} : {
    getItemLabel: PropGetItemLabel<ITEM>;
}) & (ITEM extends {
    id: string | number;
} ? {} : {
    getItemKey: PropGetItemKey<ITEM>;
}) & (GROUP extends {
    label: string;
} ? {} : {
    getGroupLabel: PropGetGroupLabel<GROUP>;
}) & (GROUP extends {
    id: string | number;
} ? {} : {
    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 {};
