import { Props } from '../../utils/types';
import React from 'react';
import { BoxProps } from '../../layouts/Box';
import { ListNavigationApi } from '../../state/ListNavigation';
import { ChangeEvent } from '../../state/TextEntry';
import { SearchHook, SearchProps } from '../Search/Search.types';
export declare type ElementTypeChecker = (element: any, index?: number, list?: any[]) => boolean;
export interface Selection {
    /**
     * @since 10.19.0
     */
    event: Event;
    /**
     * @since 10.19.0
     */
    group: boolean;
    /**
     * @since 10.19.0
     */
    item: any;
}
export interface NavigationProps extends Props {
    /**
     * @since 10.19.0
     */
    index?: number;
    /**
     * @since 10.19.0
     */
    ref?: React.Ref<any>;
}
export interface ItemProps extends NavigationProps {
    /**
     * @since 10.19.0
     */
    children?: React.ReactNode;
    /**
     * @since 10.19.0
     */
    className?: string;
    /**
     * Value which can be passed around various callback functions.
     * Can be anything!
     * @since 10.19.0
     */
    item?: any;
    /**
     * @since 10.19.0
     */
    onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => any;
    /**
     * Is the item selected
     * @default false
     * @since 10.19.0
     */
    selected?: boolean;
    /**
     * @since 10.19.0
     */
    suggested?: boolean;
}
export interface GroupProps {
    /**
     * @since 10.19.0
     */
    className?: string;
    /**
     * Can the group item be clicked
     * @since 10.19.0
     */
    clickable?: boolean;
    /**
     * Value which can be passed around various callback functions.
     * Can be anything!
     * @since 10.19.0
     */
    item?: any;
}
export interface OptionsProps {
    /**
     * @since 10.19.0
     */
    children?: React.ReactNode;
    /**
     * @since 10.19.0
     */
    className?: string;
    /**
     * @since 10.19.0
     */
    padding?: string;
    /**
     * @default true
     */
    scrollable?: boolean;
}
export interface MenuSearchProps extends SearchProps, Props {
    /**
     * The i18n key to use for the menu search's configurable strings. Defaults to
     * using the core library's default strings.
     * @since 10.19.0
     */
    i18nScope?: string;
}
export interface HeaderProps extends Props {
    /**
     * @since 10.19.0
     */
    tabIndex?: number;
}
export interface FooterProps extends Omit<BoxProps, 'as'> {
}
export interface MenuHookConfig {
    /**
     * @since 10.19.0
     */
    isSelectable?: MenuHook['isSelectable'];
    /**
     * @since 10.19.0
     */
    keyHandlerRef?: React.RefObject<HTMLElement>;
    /**
     * @since 10.19.0
     */
    multiple?: boolean;
    /**
     * @since 10.19.0
     */
    onScrollBottom?: MenuHook['onScrollBottom'];
    /**
     * @since 10.19.0
     */
    onSearch?: (event: ChangeEvent) => void;
    /**
     * @since 10.19.0
     */
    onSelect?: MenuHook['selectItem'];
    /**
     * @since 10.19.0
     */
    scrollable?: MenuHook['scrollable'];
    /**
     * @since 10.19.0
     */
    usingSearchHook?: SearchHook;
}
export interface MenuHook {
    /**
     * @since 10.19.0
     */
    domHandlers: {
        onKeyDown: (e: React.KeyboardEvent<HTMLElement>) => void;
    };
    /**
     * @since 10.19.0
     */
    highlighted: React.MutableRefObject<HTMLDivElement | null>;
    /**
     * @since 10.19.0
     */
    isSelectable: ElementTypeChecker;
    /**
     * @since 10.19.0
     */
    listNavigation: ListNavigationApi;
    /**
     * @since 10.19.0
     */
    multiple: boolean;
    /**
     * @since 10.19.0
     */
    onScrollBottom?: (e: Event) => void;
    /**
     * @default true
     */
    scrollable: boolean;
    /**
     * @since 10.19.0
     */
    search: SearchHook;
    /**
     * @since 10.19.0
     */
    selectItem: (selection: Selection) => void;
}
export interface MenuProps extends Props, Omit<OptionsProps, 'padding'> {
    /**
     * <CodeBlock>
     *  (element: any, index?: number, list?: any[]) => boolean
     * </CodeBlock>
     *
     * @deprecated
     *
     * The `isSelectable` prop has been deprecated and will be removed in a future version.
     * Menu item selection is now handled internally and there is no need to configure this
     * anymore.
     *
     * @deprecatedSince 10.20.0
     * @since 10.19.0
     */
    isSelectable?: ElementTypeChecker;
    /**
     * Ref object which will get the key handler listeners
     * @since 10.19.0
     */
    keyHandlerRef?: React.RefObject<HTMLElement>;
    /**
     * @since 10.19.0
     */
    onScrollBottom?: (e: Event) => void;
    /**
     * <div>Callback for selecting an item from the menu</div>
     * <CodeBlock>
     * {
     *   '({ event: ReactEvent, item: Menu.Item.props.item, group: bool }) => void'
     * }
     * </CodeBlock>
     * <div>
     *  <Code>item</Code> will be the <Code>item</Code> prop supplied to the{' '}
     *  <Code>Item</Code> component
     *  <br />
     *  <Code>group</Code> will be <Code>true</Code> if the clicked item was
     *  a group label
     * </div>
     * @since 10.19.0
     */
    onSelect?: (selection: Selection) => any;
    /**
     * @since 10.19.0
     */
    usingHook?: MenuHook;
    /**
     * @since 10.19.0
     */
    UNSAFE_closesOnSelect?: boolean;
}
