import { DataSource } from '../data-source';
interface FilterObj {
    field: string;
    search: string[];
}
export declare class LocalDataSource extends DataSource {
    private _data;
    private _filteredAndSorted;
    private _sortConf;
    private _filterConf;
    constructor(data?: Array<any>);
    load(data: Array<any>): Promise<any>;
    /**
     * Add a element on first position of the array.
     *
     * @param element - The element to show on table.
     */
    prepend(element: any): Promise<any>;
    /**
     * Add a element on last position of the array.
     *
     * @param element - The element to show on table.
     */
    append(element: any): Promise<any>;
    add(element: any): Promise<any>;
    remove(element: any): Promise<any>;
    update(element: any, values: any): Promise<any>;
    find(element: any): Promise<any>;
    getElements(): Promise<any>;
    getFilteredAndSorted(): Promise<any>;
    getAll(): Promise<any>;
    /**
    * This method set the sort and filters array on initial state.
    *
    * @param silent - If true dispatch a action of filter.
    */
    resetSortAndFilter(silent?: boolean): void;
    /**
     * This method set the sort array on initial state.
     *
     * @param silent - If true dispatch a action of filter.
     */
    resetSort(silent?: boolean): void;
    /**
     * This method set the filters array on initial state.
     *
     * @param silent - If true dispatch a action of filter.
     */
    resetFilter(silent?: boolean): void;
    empty(): Promise<any>;
    count(): number;
    /**
     *
     * Array of conf objects
     * [
     *  {field: string, direction: asc|desc|null, compare: Function|null},
     * ]
     * @param conf
     * @param doEmit
     */
    setSort(conf: Array<any>, doEmit?: boolean): LocalDataSource;
    /**
     *
     * Array of conf objects
     * [{ field: string, search: string, filter: Function|null },]
     *
     * @param conf
     * @param doEmit
     */
    setFilter(conf: Array<FilterObj>, doEmit?: boolean): LocalDataSource;
    addFilter(fieldConf: FilterObj, doEmit?: boolean): LocalDataSource;
    removeFilter(field: string, doEmit?: boolean): void;
    getSort(): any;
    getFilter(): FilterObj[];
    protected prepareData(data: Array<any>): Array<any>;
    protected sort(data: Array<any>): Array<any>;
    protected filter(data: Array<any>): Array<any>;
}
export {};
