import { GridRowModel, GridColumnModel, GridGroupModel } from "./model";

export interface GridType {
    kind : string;
    readOnly? : boolean;
}

export interface Column {
    Title : string;
    Description : string;
    Visible : boolean;
    ReadOnly? : boolean;
    Type : string | GridType;
    Property : string;
    menu? : Menu[];
}

export enum SortDirecton {
    None,
    Ascending,
    Descending
}

export interface SelectOption {
    value : string;
    description : string;
}

export interface Menu {
    icon? : string;
    label : string;
}

export type Option = string | SelectOption;


export interface GroupedRows {
    [group : string] : GridRowModel[];
}

export interface GridGroups {
    [name : string] : GridGroupModel;
}

export interface Row {
    [key : string] : RowValue;
}

export interface CellType {
    value : RowValue;
    type : GridType;
}

export type RowValue = number | boolean | string | CellType;



export interface GridColumns {
    [property : string] : GridColumnModel;
}