import { AtomMut } from '@reatom/framework';
import React from 'react';
import { GetGroupsResult } from '##/utils/getGroups';
import { PropsWithDefault } from '../../SelectCanary/defaultProps';
import { SelectGroupDefault, SelectItemDefault } from '..';
import { CountedGroup, Group, SelectAllItem } from '../types';
type IndexForHighlight = number | ((oldIndex: number) => number);
export type OptionForCreate = {
    label: string;
    __optionForCreate: boolean;
};
export type UseSelectProps<ITEM = SelectItemDefault, GROUP = SelectGroupDefault, MULTIPLE extends boolean = false> = {
    propsAtom: AtomMut<PropsWithDefault<ITEM, GROUP, MULTIPLE>>;
};
export type OptionProps<ITEM> = {
    index: number;
    item: ITEM | OptionForCreate | SelectAllItem;
};
export type GetOptionPropsResult = {
    onClick: (e: React.MouseEvent) => void;
    onMouseEnter: (e: React.MouseEvent) => void;
};
export declare const isOptionForCreate: <ITEM, GROUP>(params: OptionForCreate | Group<ITEM, GROUP> | ITEM) => params is OptionForCreate;
export declare const isNotOptionForCreate: <ITEM, GROUP>(params: OptionForCreate | Group<ITEM, GROUP>) => params is Group<ITEM, GROUP>;
export declare const isOptionForSelectAll: <ITEM>(params: SelectAllItem | ITEM) => params is SelectAllItem;
export declare function getCountedGroups<ITEM, GROUP>(groups: GetGroupsResult<ITEM, GROUP>, selectAll: boolean): CountedGroup<ITEM, GROUP>[];
export declare const useSelect: <ITEM = SelectItemDefault, GROUP = SelectItemDefault, MULTIPLE extends boolean = false>({ propsAtom, }: UseSelectProps<ITEM, GROUP, MULTIPLE>) => {
    openAtom: AtomMut<boolean>;
    focusAtom: AtomMut<boolean>;
    inputValueAtom: AtomMut<string>;
    clearButtonAtom: AtomMut<boolean>;
    onInput: import("@reatom/framework").Fn<[value?: string | undefined], void>;
    getOptionActions: import("@reatom/framework").Fn<[OptionProps<ITEM>], GetOptionPropsResult>;
    handleInputBlur: import("@reatom/framework").Fn<[e: React.FocusEvent<HTMLInputElement, Element>], void>;
    handleToggleDropdown: import("@reatom/framework").Fn<[], void>;
    getHandleRemoveValue: import("@reatom/framework").Fn<[item: ITEM], (e: React.SyntheticEvent) => void>;
    inputRef: React.RefObject<HTMLInputElement>;
    dropdownRef: React.RefObject<HTMLDivElement>;
    controlRef: React.RefObject<HTMLDivElement>;
    handleInputChange: import("@reatom/framework").Fn<[e: React.ChangeEvent<HTMLInputElement>], void>;
    handleInputClick: import("@reatom/framework").Fn<[], void>;
    handleInputFocus: import("@reatom/framework").Fn<[e: React.FocusEvent<HTMLInputElement, Element>], void>;
    visibleItemsAtom: AtomMut<(OptionForCreate | CountedGroup<ITEM, GROUP>)[]>;
    clearValue: import("@reatom/framework").Fn<[e: React.SyntheticEvent<Element, Event>], void>;
    optionsRefs: React.RefObject<HTMLDivElement>[];
    highlightedIndexAtom: AtomMut<number>;
    valueAtom: AtomMut<ITEM[]>;
    getItemKeyAtom: AtomMut<import("..").SelectPropGetItemKey<ITEM>>;
    onChangeAll: import("@reatom/framework").Fn<[e: React.SyntheticEvent<Element, Event>, items: ITEM[]], void>;
    highlightIndex: import("@reatom/framework").Fn<[indexForHighlight: IndexForHighlight], void>;
    onCreate: import("@reatom/framework").Fn<[e: React.SyntheticEvent<Element, Event>], void>;
    onChange: import("@reatom/framework").Fn<[e: React.SyntheticEvent<Element, Event>, item: ITEM], void>;
    hasItemsAtom: AtomMut<boolean>;
    groupsCounterAtom: AtomMut<Record<string, [number, number]>>;
    dropdownZIndexAtom: AtomMut<number | undefined>;
};
export {};
