import type React from 'react';
import type { GlobalObject } from '../../lib/globalObject.js';
import type { Nullable } from '../../typings/utility-types.js';
import type { ComboBoxExtendedItem } from '../../components/ComboBox/index.js';
import type { CustomComboBox, CustomComboBoxProps, CustomComboBoxState } from './CustomComboBox.js';
export type CustomComboBoxAction<T> = {
    type: 'ValueChange';
    value: T;
    keepFocus: boolean;
} | {
    type: 'TextChange';
    value: string;
} | {
    type: 'KeyPress';
    event: React.KeyboardEvent;
} | {
    type: 'DidUpdate';
    prevProps: CustomComboBoxProps<T>;
    prevState: CustomComboBoxState<T>;
} | {
    type: 'Mount';
} | {
    type: 'Focus';
    searchOnFocus?: boolean;
} | {
    type: 'InputClick';
} | {
    type: 'ClearCrossClick';
} | {
    type: 'Blur';
} | {
    type: 'Reset';
} | {
    type: 'Open';
} | {
    type: 'Close';
} | {
    type: 'Search';
    query: string;
} | {
    type: 'RequestItems';
} | {
    type: 'ReceiveItems';
    items: Array<ComboBoxExtendedItem<T>>;
} | {
    type: 'RequestFailure';
    repeatRequest: () => void;
} | {
    type: 'CancelRequest';
};
export type CustomComboBoxEffect<T> = (dispatch: (action: CustomComboBoxAction<T>) => void, getState: () => CustomComboBoxState<T>, getProps: () => CustomComboBoxProps<T>, getInstance: () => CustomComboBox<T>, globalObject: GlobalObject) => void;
type Effect = CustomComboBoxEffect<any>;
interface EffectFactory {
    search: (query: string) => Effect;
    debouncedSearch: Effect & {
        cancel(): void;
        flush(): void;
    };
    cancelRequest: Effect;
    blur: Effect;
    focus: Effect;
    valueChange: (value: any) => Effect;
    valueClear: Effect;
    unexpectedInput: (textValue: string, items: Nullable<any[]>) => Effect;
    inputChange: Effect;
    inputFocus: Effect;
    highlightMenuItem: Effect;
    selectMenuItem: (event: React.KeyboardEvent<HTMLElement>) => Effect;
    inputKeyDown: (event: React.KeyboardEvent<HTMLElement>) => Effect;
    moveMenuHighlight: (direction: 'up' | 'down') => Effect;
    resetHighlightedMenuItem: Effect;
    reflow: Effect;
    selectInputText: Effect;
}
export declare const Effect: EffectFactory;
export declare function reducer<T>(state: CustomComboBoxState<T>, props: CustomComboBoxProps<T>, action: CustomComboBoxAction<T>): Pick<CustomComboBoxState<T>, never> | [Pick<CustomComboBoxState<T>, never>, Array<CustomComboBoxEffect<T>>];
export {};
