import { IRowNode } from 'ag-grid-enterprise';
import { AdaptableColumn } from '../Common/AdaptableColumn';
/**
 * Very lightweight object to define an AdapTable Cell
 */
export type CellAddress = {
    /**
     * Value in Primary Key Column
     */
    PrimaryKeyValue: string | number;
    /**
     * Id of Column containing the Note
     */
    ColumnId: string;
};
/**
 * Defines a Cell in Adaptable - every cell is an intersection of a Column Id and a Primary Key Value
 */
export interface GridCell<TData = any> {
    /**
     * Column in which Cell is situated
     */
    column: AdaptableColumn<TData>;
    /**
     * Raw value of Cell
     */
    rawValue: any;
    /**
     * Normalised value of Cell
     */
    normalisedValue: any;
    /**
     * Display value of Cell (e.g. if formatted)
     */
    displayValue: any;
    /**
     * Primary Key column's value in row - how Adaptable locates the Cell
     */
    primaryKeyValue?: any;
    /**
     * Is Cell in a currently filtered Row
     */
    visible?: boolean;
    /**
     * AG Grid Row Node that holds the Cell
     */
    rowNode: IRowNode<TData>;
    /**
     * Is Cell in a Pivot Column
     */
    isPivotCell: boolean;
    /**
     * Is Cell in a Row Group Column
     */
    isRowGroupCell: boolean;
}
/**
 * Extended GridCell, props to show how often appears in data source and how often visible
 */
export interface GridCellWithCount extends GridCell {
    /**
     * How many times Cell appears in Data Source
     */
    count: number;
    /**
     * How many times Cell appears in Visible Rows
     */
    visibleCount?: number;
}
/**
 * Grid Cell used in Grouped Rows
 */
export interface GridCellWithChildren extends GridCell {
    /**
     * Children of Cell
     */
    children?: GridCellWithChildren[];
    /**
     * For the grouping scenario, how many leafs are there under this item
     */
    leafChildrenCount?: number;
}
/**
 * Defines a Unique Cell Value (incl. how many times it appears in Grid)
 */
export interface UniqueGridCell<TData = any> {
    /**
     * Raw value of Cell
     */
    rawValue: any;
    /**
     * Normalised value of Cell
     */
    normalisedValue: any;
    /**
     * Display value of Cell (e.g. if formatted)
     */
    displayValue: any;
    /**
     * Is Cell in a currently filtered Row
     */
    visible: boolean;
    /**
     * How many times Cell appears in Data Source
     */
    count: number;
    /**
     * How many times Cell appears in filtered Rows
     */
    visibleCount: number;
}
/**
 * Lightweight object used for identifying a Cell to be updated
 */
export interface CellUpdateRequest<TData = any> {
    /**
     * Id of Column in which edited cell is situated
     */
    columnId: string;
    /**
     * New Value for the cell
     */
    newValue: any;
    /**
     * Primary Key column's value in row - how Adaptable locates the cell
     */
    primaryKeyValue?: any;
    /**
     * AG Grid Row Node that contains the cell (optional)
     */
    rowNode?: IRowNode<TData>;
}
