/**
* DevExtreme (excel_exporter.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 dxDataGrid, { dxDataGridColumn } from './ui/data_grid';
import dxPivotGrid, { dxPivotGridPivotGridCell } from './ui/pivot_grid';
import { ExportLoadPanel } from './exporter/export_load_panel';

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface ExcelDataGridCell {
    /**
     */
    column?: dxDataGridColumn;
    /**
     */
    data?: any;
    /**
     */
    groupIndex?: number;
    /**
     */
    groupSummaryItems?: Array<{
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      name?: string,
      /**
       * Warning! This type is used for internal purposes. Do not import it directly.
       */
      value?: any
    }>;
    /**
     */
    rowType?: string;
    /**
     */
    totalSummaryItemName?: string;
    /**
     */
    value?: any;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface ExcelPivotGridCell extends dxPivotGridPivotGridCell {
    /**
     */
    area?: string;
    /**
     */
    rowIndex?: number;
    /**
     */
    columnIndex?: number;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface CellAddress {
    /**
     */
    row?: number;
    /**
     */
    column?: number;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface CellRange {
    /**
     */
    from?: CellAddress;
    /**
     */
    to?: CellAddress;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface ExcelExportBaseProps {
    /**
     */
    worksheet?: object;
    /**
     */
    topLeftCell?: CellAddress | string;
    /**
     */
    keepColumnWidths?: boolean;
    /**
     */
    loadPanel?: ExportLoadPanel;
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface ExcelExportDataGridProps extends ExcelExportBaseProps {
    /**
     */
    component?: dxDataGrid;
    /**
     */
    selectedRowsOnly?: boolean;
    /**
     */
    autoFilterEnabled?: boolean;
    /**
     */
    customizeCell?: ((options: { gridCell?: ExcelDataGridCell, excelCell?: any}) => any);
}

/**
 * Warning! This type is used for internal purposes. Do not import it directly.
 */
export interface ExcelExportPivotGridProps extends ExcelExportBaseProps {
    /**
     */
    component?: dxPivotGrid;
    /**
     */
    customizeCell?: ((options: { pivotCell?: ExcelPivotGridCell, excelCell?: any}) => any);
}

/**
 * Exports grid data to Excel.
 */
export function exportDataGrid(options: ExcelExportDataGridProps): Promise<CellRange> & JQueryPromise<CellRange>;

/**
 * Exports pivot grid data to Excel.
 */
export function exportPivotGrid(options: ExcelExportPivotGridProps): Promise<CellRange> & JQueryPromise<CellRange>;
