import { Type } from "@angular/core";
import { ComponentData } from "./component-data";

export declare interface ColumnModel {
    /**
     * The unique name of the column.
     *
     * @type {string}
     * @memberof ColumnModel
     */
    name: string;

    /**
     * The user-friendly name of the column.
     *
     * @type {string}
     * @memberof ColumnModel
     */
    title?: string;

    /**
     * Hidden controls the visibility of the column.
     *
     * @type {boolean}
     * @memberof ColumnModel
     */
    hidden?: boolean;

    /**
     * The component to instantiate in the grid cell.
     *
     * @type {ComponentData}
     * @memberof ColumnModel
     */
    componentData?: ComponentData;

    /**
     * Clickable controls if the column emits a click event.
     *
     * @type {boolean}
     * @memberof ColumnModel
     */
    clickable?: boolean;

    /**
     * Controls the css of the surronduing <td> tag in the grid.
     *
     * @type {string}
     * @memberof ColumnModel
     */
    css?: string;
    
    /**
     * Controls the position of the column
     * 
     * @type {number}
     * @memberof ColumnModel
     * 
     * @usageNotes
     * 
     * Columns that come from Sitefity are spaced by a multiple of 100, with the exception of the Main column
     * which will **always** be the left most column, and the Sitefinity Insight, Analytics and Actions columns
     * which will **always** be the right most columns. 
     * 
     * For example: If a gird has four columns - Main, Last Modified, Owner and Actions, the Main column will have an ordinal
     * 'Number.MIN_SAFE_INTEGER', the Last Modified column will have an ordinal of `100`, the Owner column will have an ordinal of
     * `200` and the Actions column will have an ordinal of `Number.MAX_SAFE_INTEGER`.
     */
    ordinal?: number
}
