import { InjectionToken } from "@angular/core";
import { Observable } from "rxjs";

import { ColumnModel } from "./column-model";
import { EntityData } from "../metadata";

export declare var COLUMNS_TOKEN: InjectionToken<ColumnModel>;

/**
 * A columns provider to provide columns for the list view of the content screen.
 *
 * @export
 * @interface ColumnsProvider
 * @deprecated Use ListColumnsProvider
 */
export declare interface ColumnsProvider {
    /**
     * Gets an observable collection of columns.
     *
     * @param {EntityData} entityData Metadata for the content type of current list view.
     * @returns {Observable<ColumnModel[]>} Observable collection of columns that will be added to the list view.
     * @memberof ColumnsProvider
     */
    getColumns(entityData: EntityData): Observable<ColumnModel[]>;
}

/**
 * A columns provider to provide columns for the list view of the content screen.
 *
 * @export
 * @interface ListColumnsProvider
 */
export declare interface ListColumnsProvider {
    /**
     * Gets an observable collection of columns.
     *
     * @param {EntityData} entityData Metadata for the content type of current list view.
     * @returns {Observable<ColumnModel[]>} Observable collection of columns that will be added to the list view.
     * @memberof ListColumnsProvider
     */
    getColumns(entityData: EntityData): Observable<ColumnModel[]>;

    /**
     * Gets an obaservable collection of columns to be removed.
     *
     * @param {EntityData} entityData Metadata for the content type of current list view.
     * @returns {Observable<string[]>} Observable collection of columns that will be removed from the list view.
     * @memberof ListColumnsProvider
     */
    getColumnsToRemove(entityData: EntityData): Observable<string[]>;
}
