/**
* DevExtreme (ui/drop_down_button.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 '../jquery_augmentation';

import {
    dxElement
} from '../core/element';

import {
    template
} from '../core/templates/template';

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

import {
    event
} from '../events/index';

import {
    dxListItem
} from './list';

import {
    dxPopupOptions
} from './popup';

import Widget, {
    WidgetOptions
} from './widget/ui.widget';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxDropDownButtonOptions extends WidgetOptions<dxDropDownButton> {
    /**
     */
    dataSource?: string | Array<dxDropDownButtonItem | any> | DataSource | DataSourceOptions;
    /**
     */
    deferRendering?: boolean;
    /**
     */
    displayExpr?: string | ((itemData: any) => string);
    /**
     */
    dropDownContentTemplate?: template | ((data: Array<string | number | any> | DataSource, contentElement: dxElement) => string | Element | JQuery);
    /**
     */
    dropDownOptions?: dxPopupOptions;
    /**
     */
    focusStateEnabled?: boolean;
    /**
     */
    hoverStateEnabled?: boolean;
    /**
     */
    icon?: string;
    /**
     */
    itemTemplate?: template | ((itemData: any, itemIndex: number, itemElement: dxElement) => string | Element | JQuery);
    /**
     */
    items?: Array<dxDropDownButtonItem | any>;
    /**
     */
    keyExpr?: string;
    /**
     */
    noDataText?: string;
    /**
     */
    onButtonClick?: ((e: { component?: dxDropDownButton, element?: dxElement, model?: any, event?: event, selectedItem?: any }) => any) | string;
    /**
     */
    onItemClick?: ((e: { component?: dxDropDownButton, element?: dxElement, model?: any, event?: event, itemData?: any, itemElement?: dxElement }) => any) | string;
    /**
     */
    onSelectionChanged?: ((e: { component?: dxDropDownButton, element?: dxElement, model?: any, item?: any, previousItem?: any }) => any) | string;
    /**
     */
    opened?: boolean;
    /**
     */
    selectedItem?: string | number | any;
    /**
     */
    selectedItemKey?: string | number;
    /**
     */
    showArrowIcon?: boolean;
    /**
     */
    splitButton?: boolean;
    /**
     */
    stylingMode?: 'text' | 'outlined' | 'contained';
    /**
     */
    text?: string;
    /**
     */
    useSelectMode?: boolean;
    /**
     */
    wrapItemText?: boolean;
}
/**
 */
export default class dxDropDownButton extends Widget {
    constructor(element: Element, options?: dxDropDownButtonOptions)
    constructor(element: JQuery, options?: dxDropDownButtonOptions)
    /**
     */
    close(): Promise<void> & JQueryPromise<void>;
    getDataSource(): DataSource;
    /**
     */
    open(): Promise<void> & JQueryPromise<void>;
    /**
     */
    toggle(): Promise<void> & JQueryPromise<void>;
    /**
     */
    toggle(visibility: boolean): Promise<void> & JQueryPromise<void>;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface dxDropDownButtonItem extends dxListItem {
    /**
     */
    onClick?: ((e: { component?: dxDropDownButton, element?: dxElement, model?: any, event?: event }) => any) | string;
}

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

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