import { ITableData } from '../../models/ITableData';
import { Observable } from 'rxjs';
export declare class CSVService {
/**
* Creates a sample csv with just the column the headers and prompts to download
* @param anchor The html element that serves as download button
* @param filename The generated csv filename
* @param cols Array with fields to use as headers
*/
static exportCSV(anchor: HTMLAnchorElement, filename: string, cols: string[]): void;
/**
* Creates a sample csv with the suplied sample data and prompts to download
* @param anchor The html element that serves as download button
* @param filename The generated csv filename
* @param data Array with sample data as objects
*/
static exportCSV(anchor: HTMLAnchorElement, filename: string, sample: {
[header: string]: (string | number | boolean);
}[]): void;
/**
* Parse a csv string and return an array of objects, taking the header row as keys
* @param file CSV string to parse
*/
/**
* Parse a csv file and return an array of objects, taking the header row as keys
* @param file CSV File to parse
*/
static parseCSV(file: File): Observable;
/**
* Parse a csv file and return an array of objects, taking the header row as keys
* If step is present it emmits row by row, use for large files
* @param file CSV File to parse
* @param step Whether to parse whole file or row by row
*/
static parseCSV(file: File, step: boolean): Observable;
/**
* Transform papaparse data to key value pairs
* @param data The data to transform. First row are the keys and the rest are the rows
* @returns The transformed data
*/
static transformData(data: any[]): ITableData[];
}