/**
* DevExtreme (ui/menu.d.ts)
* Version: 21.1.0 (build 21016-0316)
* Build date: Sat Jan 16 2021
*
* Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
    dxElement
} from '../core/element';

import DataSource, {
    DataSourceOptions
} from '../data/data_source';

import {
    CollectionWidgetItem
} from './collection/ui.collection_widget.base';

import dxMenuBase, {
    dxMenuBaseOptions
} from './context_menu/ui.menu_base';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxMenuOptions extends dxMenuBaseOptions<dxMenu> {
    /**
     */
    adaptivityEnabled?: boolean;
    /**
     */
    dataSource?: string | Array<dxMenuItem> | DataSource | DataSourceOptions;
    /**
     */
    hideSubmenuOnMouseLeave?: boolean;
    /**
     */
    items?: Array<dxMenuItem>;
    /**
     */
    onSubmenuHidden?: ((e: { component?: dxMenu, element?: dxElement, model?: any, rootItem?: dxElement }) => any);
    /**
     */
    onSubmenuHiding?: ((e: { component?: dxMenu, element?: dxElement, model?: any, rootItem?: dxElement, cancel?: boolean }) => any);
    /**
     */
    onSubmenuShowing?: ((e: { component?: dxMenu, element?: dxElement, model?: any, rootItem?: dxElement }) => any);
    /**
     */
    onSubmenuShown?: ((e: { component?: dxMenu, element?: dxElement, model?: any, rootItem?: dxElement }) => any);
    /**
     */
    orientation?: 'horizontal' | 'vertical';
    /**
     */
    showFirstSubmenuMode?: {
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      delay?: {
        /**
         * Warning! This type is used for internal purposes. Do not import it directly.
         */
        hide?: number,
        /**
         * Warning! This type is used for internal purposes. Do not import it directly.
         */
        show?: number
      } | number,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      name?: 'onClick' | 'onHover'
    } | 'onClick' | 'onHover';
    /**
     */
    submenuDirection?: 'auto' | 'leftOrTop' | 'rightOrBottom';
}
/**
 */
export default class dxMenu extends dxMenuBase {
    constructor(element: Element, options?: dxMenuOptions)
    constructor(element: JQuery, options?: dxMenuOptions)
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxMenuBaseItem extends CollectionWidgetItem {
    /**
     */
    beginGroup?: boolean;
    /**
     */
    closeMenuOnClick?: boolean;
    /**
     */
    disabled?: boolean;
    /**
     */
    icon?: string;
    /**
     */
    items?: Array<dxMenuBaseItem>;
    /**
     */
    selectable?: boolean;
    /**
     */
    selected?: boolean;
    /**
     */
    text?: string;
    /**
     */
    visible?: boolean;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxMenuItem extends dxMenuBaseItem {
    /**
     */
    items?: Array<dxMenuItem>;
}

declare global {
interface JQuery {
    dxMenu(): JQuery;
    dxMenu(options: "instance"): dxMenu;
    dxMenu(options: string): any;
    dxMenu(options: string, ...params: any[]): any;
    dxMenu(options: dxMenuOptions): JQuery;
}
}
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type Options = dxMenuOptions;

/** @deprecated use Options instead */
/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export type IOptions = dxMenuOptions;
