import type { IComponent } from '../agStack/interfaces/iComponent'; import type { AgGridCommon } from './iCommon'; export type StatusBar = { statusPanels: StatusPanelDef[]; }; export interface StatusPanelDef { statusPanel?: any; align?: string; key?: string; statusPanelParams?: any; } export interface IStatusPanelValueFormatterParams extends AgGridCommon { value: number | null; bigintValue?: bigint; totalRows: number; key: string; } export interface IProvidedStatusPanelParams { valueFormatter?: (params: IStatusPanelValueFormatterParams) => string; } export interface IStatusPanelParams extends AgGridCommon { key: string; } export type AggregationStatusPanelAggFunc = 'count' | 'sum' | 'min' | 'max' | 'avg'; export interface IAggregationStatusPanelParams extends IProvidedStatusPanelParams { aggFuncs: AggregationStatusPanelAggFunc[]; } export interface AggregationStatusPanelParams extends IAggregationStatusPanelParams, IStatusPanelParams { aggFuncs: AggregationStatusPanelAggFunc[]; } export interface IStatusPanel { /** * Called when the `statusBar` grid option is updated. * If this method returns `true`, * the grid assumes that the status panel has updated with the latest params, * and takes no further action. * If this method returns `false`, or is not implemented, * the grid will destroy and recreate the status panel. */ refresh?(params: IStatusPanelParams): boolean; } export interface IStatusPanelComp extends IStatusPanel, IComponent> { }