//@ts-ignore
import { AppContextType, BasicAlignment, Coordinates, FalsyJSX, Icon, PropsWithDefaults, Size, StaticDefaultProps } from '@grapecity/core-ui';
/// <reference path="../vendor/react/react.d.ts" />
//@ts-ignore
import * as React from 'react';
import { ARIALabels } from './essentials';
export type DropdownButton = {
    type: 'button';
    key?: React.Key;
    icon?: Icon;
    text?: string;
    title?: string;
    value?: any;
    selected?: boolean;
    disabled?: boolean;
    onClick?: (value?: any, XYCoord?: Coordinates) => void;
};
export type DropdownGroup = {
    type: 'group';
    key?: React.Key;
    icon?: Icon;
    text?: string;
    title?: string;
    value?: any;
    selected?: boolean;
    disabled?: boolean;
    items?: DropdownItem[];
    menuCustomCSS?: string;
    onClick?: (value?: any) => void;
};
export type DropdownSplitter = {
    type: 'splitter';
};
export type DropdownHeader = {
    type: 'header';
    header: string;
};
export type DropdownCustomItem = {
    type: 'custom';
    customContent: React.ReactChild;
};
export type DropdownItem = DropdownButton | DropdownSplitter | DropdownHeader | DropdownGroup | DropdownCustomItem | FalsyJSX;
export type DropdownMenuWidth = 'default' | '100%' | 'auto' | number;
export type DropdownMenuMaxHeight = 'none' | 'default' | number;
type ParentElement = {
    type: 'element';
    element: HTMLDivElement;
};
type ParentMouse = {
    type: 'mouse';
    position: Coordinates;
};
export type DropdownMenuProps = {
    dataAid?: string;
    parent: ParentElement | ParentMouse;
    items?: DropdownItem[];
    content?: any;
    multiselect?: boolean;
    width?: DropdownMenuWidth;
    align?: BasicAlignment;
    dropup?: boolean;
    dropOnSide?: boolean;
    offset?: boolean | number;
    size?: Size;
    maxHeight?: DropdownMenuMaxHeight;
    edgeSnapOffset?: number;
    scrollToSelection?: boolean;
    customCSS?: string;
    onItemClick?: (item: DropdownItem) => void;
    generateItemPreview?: (value: any, selected?: boolean) => JSX.Element | null;
    customButtonRenderer?: (item: DropdownButton) => JSX.Element | null;
    onTransitionEnd?: () => void;
    customScroll?: boolean;
    ariaRole?: string;
} & ARIALabels;
type DropdownMenuDefaultProps = keyof Pick<DropdownMenuProps, 'align' | 'dropup' | 'dropOnSide' | 'edgeSnapOffset' | 'maxHeight' | 'multiselect' | 'offset' | 'scrollToSelection' | 'size' | 'width' | 'customScroll' | 'ariaRole'>;
type DropdownMenuState = {
    focusedItemId: string | null;
    expandGroupDropDownItemId: number | null;
    inTransitionDropDownId: number | null;
};
declare const scrollElement: string;
declare const headerElement: string;
declare const itemElement: string, itemModifier: (modifierName: string) => string;
declare const itemPreviewElement: string;
export { scrollElement as ddMenuScrollClass, itemElement as ddMenuItemClass, itemModifier as ddMenuItemModifier, itemPreviewElement as ddMenuItemPreviewClass, headerElement as ddMenuHeaderClass, };
export declare class DropdownMenu extends React.Component<DropdownMenuProps, DropdownMenuState> {
//@ts-ignore
    static contextType: React.Context<import("@grapecity/core-ui/lib/types/utils").AppContextValue>;
    context: AppContextType;
    static defaultProps: StaticDefaultProps<DropdownMenuProps, DropdownMenuDefaultProps>;
    props: PropsWithDefaults<DropdownMenuProps, DropdownMenuDefaultProps>;
    private _root;
    private _menu;
    private _positioner;
    private _scrollContainer;
    private _itemsCollection;
    constructor(props: DropdownMenuProps, context: AppContextType);
    state: DropdownMenuState;
    componentDidMount(): void;
    componentDidUpdate(prevProps: DropdownMenuProps): void;
    private onToggleGroupItem;
    private setEndTransition;
    private getRoot;
    private storeItems;
    private resetFocusedItem;
    getFocusedItemId: () => string | null;
    updatePosition: () => void;
    focusNextItem: () => void;
    focusPrevItem: () => void;
    selectFocusedItem: () => void;
    getMenuNode: () => HTMLDivElement | null;
    getPositionerNode: () => HTMLDivElement | null | undefined;
    onItemClick: (item: DropdownItem) => () => void;
    private generatePreview;
    private getMenuRect;
    private getMenuAlign;
    private forseUpdateScrollContainer;
    private renderContent;
    render(): React.ReactPortal;
}
