/**
* DevExtreme (ui/gantt.d.ts)
* Version: 20.1.7
* Build date: Tue Aug 25 2020
*
* Copyright (c) 2012 - 2020 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 {
    dxTreeListColumn
} from './tree_list';

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

import {
    dxToolbarItem
} from './toolbar';

/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxGanttOptions extends WidgetOptions<dxGantt> {
    /** Specifies whether users can select tasks in the Gantt. */
    allowSelection?: boolean;
    /** An array of columns in the Gantt. */
    columns?: Array<dxTreeListColumn | string>;
    /** Configures dependencies. */
    dependencies?: { dataSource?: Array<any> | DataSource | DataSourceOptions, keyExpr?: string | Function, predecessorIdExpr?: string | Function, successorIdExpr?: string | Function, typeExpr?: string | Function };
    /** Configures edit options. */
    editing?: { allowDependencyAdding?: boolean, allowDependencyDeleting?: boolean, allowResourceAdding?: boolean, allowResourceDeleting?: boolean, allowResourceUpdating?: boolean, allowTaskAdding?: boolean, allowTaskDeleting?: boolean, allowTaskUpdating?: boolean, enabled?: boolean };
    /** Configures validation options. */
    validation?: { validateDependencies?: boolean, autoUpdateParentTasks?: boolean };
    /** A function that is executed after users select a task or clear its selection. */
    onSelectionChanged?: ((e: { component?: dxGantt, element?: dxElement, model?: any, selectedRowKey?: any }) => any);
    /** Configures resource assignments. */
    resourceAssignments?: { dataSource?: Array<any> | DataSource | DataSourceOptions, keyExpr?: string | Function, resourceIdExpr?: string | Function, taskIdExpr?: string | Function };
    /** Configures task resources. */
    resources?: { dataSource?: Array<any> | DataSource | DataSourceOptions, keyExpr?: string | Function, textExpr?: string | Function };
    /** Specifies the zoom level of tasks in the Gantt chart. */
    scaleType?: 'auto' | 'minutes' | 'hours' | 'days' | 'weeks' | 'months' | 'quarters' | 'years';
    /** Allows you to select a row or determine which row is selected. */
    selectedRowKey?: any;
    /** Specifies whether to display task resources. */
    showResources?: boolean;
    /** Specifies whether to show/hide horizontal faint lines that separate tasks. */
    showRowLines?: boolean;
    /** Specifies the width of the task list in pixels. */
    taskListWidth?: number;
    /** Specifies a task's title position. */
    taskTitlePosition?: 'inside' | 'outside' | 'none';
    /**  */
    firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
    /** Configures tasks. */
    tasks?: { dataSource?: Array<any> | DataSource | DataSourceOptions, endExpr?: string | Function, keyExpr?: string | Function, parentIdExpr?: string | Function, progressExpr?: string | Function, startExpr?: string | Function, titleExpr?: string | Function };
    /** Configures toolbar settings. */
    toolbar?: dxGanttToolbar;
    /** Configures strip lines. */
    stripLines?: Array<dxGanttStripLine>;
}
/** The Gantt is a widget that displays the task flow and dependencies between tasks. */
export default class dxGantt extends Widget {
    constructor(element: Element, options?: dxGanttOptions)
    constructor(element: JQuery, options?: dxGanttOptions)
}

/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxGanttToolbar {
    /** Configures toolbar items' settings. */
    items?: Array<dxGanttToolbarItem | 'separator' | 'undo' | 'redo' | 'expandAll' | 'collapseAll' | 'addTask' | 'deleteTask' | 'zoomIn' | 'zoomOut'>;
}

/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxGanttToolbarItem extends dxToolbarItem {
    /** Specifies the toolbar item's name. */
    name?: 'separator' | 'undo' | 'redo' | 'expandAll' | 'collapseAll' | 'addTask' | 'deleteTask' | 'zoomIn' | 'zoomOut' | string;
    /** Specifies the toolbar item's location. */
    location?: 'after' | 'before' | 'center';
}

/** Warning! This type is used for internal purposes. Do not import it directly. */
export interface dxGanttStripLine {
    /** Specifies the name of the cascading style sheet (CSS) class associated with the strip line. */
    cssClass?: string;
    /** Specifies the end point of the strip line. */
    end?: Date | number | string | (() => Date | number | string);
    /** Specifies the start point of the strip line. */
    start?: Date | number | string | (() => Date | number | string);
    /** Specifies the strip line's title. */
    title?: string;
}

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

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