import { ComponentType } from 'react';
import { ItemProps } from 'react-virtuoso';
import { Props } from '../_utils/types';
export interface MenuComponentContext<Item> {
    items?: Item[];
    totalSize?: number;
    /**
     * Function that returns label for given item
     * @default (item: Item) => item.label
     * @since 11.3.0
     */
    getItemLabel?(item: Item): string;
    /**
     * Handler for selecting menu items
     * @since 11.1.1
     */
    onSelect?: (event: any) => Item;
}
interface MenuComponents {
    Item?: ComponentType<{
        context?: MenuComponentContext<any>;
    }>;
    Group?: ComponentType<{
        context?: MenuComponentContext<any>;
    }>;
}
export interface NextMenuProps<Item, Group> extends Props {
    /**
     * Components used for UI customization
     * @since 11.3.0
     * */
    components?: MenuComponents;
    /**
     * Items that should be rendered in the menu. Presorted to display order.
     * It is ignored for grouped menu
     * @see menuItemRenderer
     * @since 11.1.1
     */
    items: Item[];
    /**
     * Groups that should be rendered in the menu
     * Only used when grouping
     * @since 11.1.1
     */
    groups?: (Group & {
        id: string | number;
    })[];
    /**
     * Function that returns group id for given item
     * @since 11.1.1
     */
    getItemGroupId?(item: Item): string | number;
    /**
     * Function that returns label for given item
     * @since 11.1.1
     */
    getItemLabel?(item: Item): string;
    /**
     * Specifies the amount of items in each group (and, actually, how many groups are there).
     * For example, passing [20, 30] will display 2 groups with 20 and 30 items each.
     * @since 11.1.1
     */
    groupCounts?: number[];
    /**
     * The property causes the component to render more items than the necessary, but reduces the re-renders on scroll.
     * @default 20
     * @since 11.3.0
     * */
    overscan?: number;
    /**
     * Handler for selecting menu items
     * @since 11.1.1
     */
    onSelect?: (event: any) => Item;
    /**
     * Gets called when the user scrolls to the end of the list.
     * Receives the last item index as an argument. Can be used to implement endless scrolling.
     * @since 11.3.0
     */
    onEndReached?: (index: number) => void;
}
export interface NextMenuItemProps<Item> extends ItemProps {
    item?: Item;
    /**
     * @default false
     * @since 11.1.1
     */
    isSelected?: boolean;
    /**
     * Size of the list in which this item is rendered
     * Used for accessibility purposes
     * @since 11.3.0
     * */
    totalSize: number;
    /**
     * Item position in list
     * @since 11.3.0
     * */
    itemPositionInList: number;
    context?: MenuComponentContext<Item>;
}
export interface NextMenuGroupProps<Group> extends NextMenuItemProps<Group> {
}
export {};
