import { EventEmitter } from '@angular/core';
import { IBaseEventArgs } from '../../core/utils';
import { GridColumnDataType } from '../../data-operations/data-util';
import { IgxExporterOptionsBase } from './exporter-options-base';
import { ColumnType, GridType } from '../../grids/common/grid.interface';
export declare enum ExportRecordType {
    GroupedRecord = "GroupedRecord",
    TreeGridRecord = "TreeGridRecord",
    DataRecord = "DataRecord",
    HierarchicalGridRecord = "HierarchicalGridRecord",
    HeaderRecord = "HeaderRecord",
    PivotGridRecord = "PivotGridRecord"
}
export declare enum HeaderType {
    RowHeader = "RowHeader",
    ColumnHeader = "ColumnHeader",
    MultiRowHeader = "MultiRowHeader",
    MultiColumnHeader = "MultiColumnHeader"
}
export interface IExportRecord {
    data: any;
    level: number;
    type: ExportRecordType;
    owner?: string | GridType;
    hidden?: boolean;
}
export interface IColumnList {
    columns: IColumnInfo[];
    columnWidths: number[];
    indexOfLastPinnedColumn: number;
    maxLevel?: number;
    maxRowLevel?: number;
}
export interface IColumnInfo {
    header: string;
    field: string;
    skip: boolean;
    dataType?: GridColumnDataType;
    skipFormatter?: boolean;
    formatter?: any;
    headerType?: HeaderType;
    startIndex?: number;
    columnSpan?: number;
    rowSpan?: number;
    level?: number;
    exportIndex?: number;
    pinnedIndex?: number;
    columnGroupParent?: ColumnType | string;
    columnGroup?: ColumnType | string;
    currencyCode?: string;
    displayFormat?: string;
    digitsInfo?: string;
}
/**
 * rowExporting event arguments
 * this.exporterService.rowExporting.subscribe((args: IRowExportingEventArgs) => {
 * // set args properties here
 * })
 */
export interface IRowExportingEventArgs extends IBaseEventArgs {
    /**
     * Contains the exporting row data
     */
    rowData: any;
    /**
     * Contains the exporting row index
     */
    rowIndex: number;
    /**
     * Skip the exporting row when set to true
     */
    cancel: boolean;
}
/**
 * columnExporting event arguments
 * ```typescript
 * this.exporterService.columnExporting.subscribe((args: IColumnExportingEventArgs) => {
 * // set args properties here
 * });
 * ```
 */
export interface IColumnExportingEventArgs extends IBaseEventArgs {
    /**
     * Contains the exporting column header
     */
    header: string;
    /**
     * Contains the exporting column field name
     */
    field: string;
    /**
     * Contains the exporting column index
     */
    columnIndex: number;
    /**
     * Skip the exporting column when set to true
     */
    cancel: boolean;
    /**
     * Export the column's data without applying its formatter, when set to true
     */
    skipFormatter: boolean;
    /**
     * A reference to the grid owner.
     */
    grid?: GridType;
}
export declare const DEFAULT_OWNER = "default";
export declare abstract class IgxBaseExporter {
    exportEnded: EventEmitter<IBaseEventArgs>;
    /**
     * This event is emitted when a row is exported.
     * ```typescript
     * this.exporterService.rowExporting.subscribe((args: IRowExportingEventArgs) => {
     * // put event handler code here
     * });
     * ```
     *
     * @memberof IgxBaseExporter
     */
    rowExporting: EventEmitter<IRowExportingEventArgs>;
    /**
     * This event is emitted when a column is exported.
     * ```typescript
     * this.exporterService.columnExporting.subscribe((args: IColumnExportingEventArgs) => {
     * // put event handler code here
     * });
     * ```
     *
     * @memberof IgxBaseExporter
     */
    columnExporting: EventEmitter<IColumnExportingEventArgs>;
    protected _sort: any;
    protected pivotGridFilterFieldsCount: number;
    protected _ownersMap: Map<any, IColumnList>;
    private locale;
    private isPivotGridExport;
    private options;
    private flatRecords;
    private pivotGridColumns;
    private pivotGridRowDimensionsMap;
    private pivotGridKeyValueMap;
    /**
     * Method for exporting IgxGrid component's data.
     * ```typescript
     * this.exporterService.export(this.igxGridForExport, this.exportOptions);
     * ```
     *
     * @memberof IgxBaseExporter
     */
    export(grid: any, options: IgxExporterOptionsBase): void;
    /**
     * Method for exporting any kind of array data.
     * ```typescript
     * this.exporterService.exportData(this.arrayForExport, this.exportOptions);
     * ```
     *
     * @memberof IgxBaseExporter
     */
    exportData(data: any[], options: IgxExporterOptionsBase): void;
    private addToRowDimensionsMap;
    private exportGridRecordsData;
    private calculateColumnSpans;
    private exportRow;
    private reorderColumns;
    private prepareData;
    private preparePivotGridData;
    private prepareHierarchicalGridData;
    private addHierarchicalGridData;
    private prepareIslandData;
    private getAllChildColumnsAndData;
    private prepareGridData;
    private prepareTreeGridData;
    private addTreeGridData;
    private addFlatData;
    private addGroupedData;
    private getColumns;
    private mapHierarchicalGridColumns;
    private getAutoGeneratedColumns;
    addPivotGridColumns(grid: any): void;
    private preparePivotGridColumns;
    private resetDefaults;
    protected abstract exportDataImplementation(data: any[], options: IgxExporterOptionsBase, done: () => void): void;
}
