import { EventEmitter } from '@angular/core';
import { IBaseEventArgs } from '../../core/utils';
import { GridColumnDataType } from '../../data-operations/data-util';
import { IgxExporterOptionsBase } from './exporter-options-base';
import { IgxGridBaseDirective } from '../../grids/public_api';
import { ColumnType } from '../../grids/common/column.interface';
export declare enum ExportRecordType {
    GroupedRecord = "GroupedRecord",
    TreeGridRecord = "TreeGridRecord",
    DataRecord = "DataRecord",
    HierarchicalGridRecord = "HierarchicalGridRecord",
    HeaderRecord = "HeaderRecord"
}
export declare enum HeaderType {
    ColumnHeader = "ColumnHeader",
    MultiColumnHeader = "MultiColumnHeader"
}
export interface IExportRecord {
    data: any;
    level: number;
    type: ExportRecordType;
    owner?: string | IgxGridBaseDirective;
    hidden?: boolean;
}
export interface IColumnList {
    columns: IColumnInfo[];
    columnWidths: number[];
    indexOfLastPinnedColumn: number;
    maxLevel?: number;
}
export interface IColumnInfo {
    header: string;
    field: string;
    skip: boolean;
    dataType?: GridColumnDataType;
    skipFormatter?: boolean;
    formatter?: any;
    headerType?: HeaderType;
    startIndex?: number;
    columnSpan?: number;
    level?: number;
    exportIndex?: number;
    pinnedIndex?: number;
    columnGroupParent?: ColumnType;
    columnGroup?: ColumnType;
}
/**
 * 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?: IgxGridBaseDirective;
}
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 _ownersMap: Map<any, IColumnList>;
    private flatRecords;
    private options;
    /**
     * 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 exportGridRecordsData;
    private calculateColumnSpans;
    private exportRow;
    private reorderColumns;
    private prepareData;
    private prepareHierarchicalGridData;
    private addHierarchicalGridData;
    private prepareIslandData;
    private getAllChildColumnsAndData;
    private prepareGridData;
    private prepareTreeGridData;
    private addTreeGridData;
    private addFlatData;
    private addGroupedData;
    private getColumns;
    private mapHierarchicalGridColumns;
    private getAutoGeneratedColumns;
    private resetDefaults;
    protected abstract exportDataImplementation(data: any[], options: IgxExporterOptionsBase, done: () => void): void;
}
