import type * as React from 'react';
import type { BoxProps } from '../Box';
import type { TypeaheadInputProps, TypeaheadProps } from '../Typeahead/Typeahead.types';
import type { AnchorAttributes, Props } from '../_utils/types';
export declare type Ref<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
declare type Div = React.ComponentPropsWithoutRef<'div'>;
export interface Selection {
    /**
     * @since 10.19.0
     */
    event: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>;
    /**
     * @since 10.19.0
     */
    group: boolean;
    /**
     * @since 10.19.0
     */
    item: any;
    /**
     * @since 10.19.0
     */
    action: 'selected' | 'unselected';
    /**
     * Indicates should focus be restored to the trigger(e.g. Button of Dropdown)
     * after activating this item. If all items return focus to the trigger once activated,
     * try just `restoreFocusOnHide` on `Dropdown` instead.
     * if it is `undefined`, it is omitted in onSelect callback.
     * @since 11.15.0
     */
    restoreFocus?: boolean;
}
export interface Reorder {
    /**
     * @since 10.19.0
     */
    draggableId: string;
    /**
     * @since 10.19.0
     */
    source: {
        index: number;
        droppableId: string;
    };
    /**
     * @since 10.19.0
     */
    destination: {
        index: number;
        droppableId: string;
    };
}
declare type MenuRole = 'menu' | 'listbox' | 'none';
export interface MenuProps extends Omit<Div, 'onSelect' | 'onDragEnd'> {
    /**
     * @since 10.19.0
     */
    circular?: boolean;
    /**
     * Set aria-multiselectable="true"
     * @since 10.19.0
     */
    multiple?: boolean;
    /**
     * @since 10.19.0
     */
    onDragEnd?: (result: Reorder) => void;
    /**
     * @since 10.19.0
     */
    onScrollBottom?: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
    /**
     * @since 10.19.0
     */
    onSelect?: (selection: Selection) => any;
    /**
     * A menu is a widget that offers a list of choices to the user, such as a set of actions or functions.
     *
     * A listbox widget presents a list of options and allows a user to select one or more of them.
     *
     * @since 11.3.0
     */
    role?: MenuRole;
    /**
     * Used when navigation in the menu is controlled by search or another input,
     * called each time virtual focus (highlighted item) is changed
     * Consider use `useMenuImperativeControlNavigation` hook.
     *
     * @since 11.5.0
     */
    onChangeActiveDescendant?: (id: string | undefined) => void;
    /**
     * To override default menu navigation
     * @since 11.5.0
     */
    onKeyboardNavigation?: React.KeyboardEventHandler;
}
export interface MenuRef {
    /**
     * @since 10.19.0
     */
    el: HTMLDivElement | null;
    /**
     * @since 10.19.0
     */
    highlight: (item: HTMLElement, shouldScroll?: boolean) => void;
    /**
     * @since 10.19.0
     */
    highlightFirst: (shouldScroll?: boolean) => void;
    /**
     * @since 10.19.0
     */
    highlightLast: (shouldScroll?: boolean) => void;
    /**
     * @since 10.19.0
     */
    highlightSelected: (shouldScroll?: boolean) => void;
    /**
     * @since 10.19.0
     */
    highlightSuggested: (shouldScroll?: boolean) => void;
    /**
     * @since 10.19.0
     */
    highlighted: () => any;
    /**
     * @since 10.19.0
     */
    next: (circular?: boolean) => void;
    /**
     * @since 10.19.0
     */
    prev: (circular?: boolean) => void;
    /**
     * @since 10.19.0
     */
    select: (event: React.MouseEvent<HTMLElement, MouseEvent> | React.KeyboardEvent<HTMLElement>) => void;
    /**
     *  Usefully for extending navigation behavior with `onKeyboardNavigation`.
     *  Pay attention that `ref` is `null` on first render.
     *
     *  ```
     *  onKeyboardNavigation={(e) => {
     *    if (e.key === 'Right' || e.key === 'ArrowRight') {
     *        return navigateRight()
     *    }
     *
     *    ref.defaultKeyDownNavigationHandler(e)
     *  }}
     *  ```
     *
     * @since 11.5.0
     */
    defaultKeyDownNavigationHandler: React.KeyboardEventHandler;
}
export interface ItemProps {
    /**
     * @since 10.19.0
     */
    item: any;
    /**
     * @since 10.19.0
     */
    selected?: boolean;
    /**
     * @since 10.19.0
     */
    suggested?: boolean;
    /**
     * @since 10.19.0
     */
    disabled?: boolean;
    /**
     * Indicates should focus be restored to the trigger(e.g. Button of Dropdown)
     * after activating this item. If all items return focus to the trigger once activated,
     * try just `restoreFocusOnHide` on `Dropdown` instead.
     * if it is `undefined`, it is omitted in onSelect callback.
     * @since 11.15.0
     */
    restoreFocus?: boolean;
}
export interface ItemWithDraggingProps extends ItemProps {
    /**
     * @since 10.19.0
     */
    droppableIn: string | string[];
    /**
     * @since 10.19.0
     */
    draggableId: string;
    /**
     * @since 10.19.0
     */
    draggableIndex: number;
}
interface AnchorItemProps extends Omit<ItemProps, 'item'>, Omit<AnchorAttributes, 'onClick'> {
}
export declare type MenuItemProps = ItemProps | ItemWithDraggingProps | AnchorItemProps;
export declare type MenuItemDefaultElement = 'div' | 'a';
export interface GroupProps {
    /**
     * @since 10.19.0
     */
    clickable?: boolean;
    /**
     * @since 10.19.0
     */
    item?: any;
}
export interface OptionsProps {
    /**
     * @since 10.19.0
     */
    children?: React.ReactNode;
    /**
     * @since 10.19.0
     */
    className?: string;
}
export interface MenuSearchProps extends Omit<TypeaheadProps, 'onChange'>, TypeaheadInputProps, Props {
    /**
     * @since 10.19.0
     */
    i18nScope?: string;
    /**
     * @since 10.21.0
     */
    onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
}
export interface HeaderProps extends Props {
    /**
     * @since 10.19.0
     */
    tabIndex?: number;
}
export interface DroppableProps {
    /**
     * @since 10.19.0
     */
    id: string;
    /**
     * @since 10.19.0
     */
    children: React.ReactNode;
}
export interface FooterProps extends Omit<BoxProps, 'as'> {
}
export interface MenuContext {
    /**
     * @since 11.5.0
     */
    a11yOptionsProps: {
        role?: MenuRole;
        onKeyboardNavigation?: React.KeyboardEventHandler | null;
        tabIndex?: number;
        id?: string;
    };
    /**
     * @since 10.19.0
     */
    currentlyDroppableIn: string[];
    /**
     * @since 10.19.0
     */
    onHoverItem: (el?: HTMLDivElement) => void;
    /**
     * @since 10.19.0
     */
    onScrollBottom: (e: React.UIEvent<HTMLDivElement, UIEvent>) => void;
    /**
     * @since 10.19.0
     */
    onSelect: (selection: Selection) => void;
    /**
     * @since 11.3.0
     */
    role: MenuRole;
}
export {};
