import { ConfigState } from './ConfigState';
import { AdaptableObject } from './Common/AdaptableObject';
import { ColumnSort } from './Common/ColumnSort';
import { ColumnFilter, GridFilter } from '../types';
import { AggregationColumns } from './Common/AggregationColumns';
import { RowSummary } from './Common/RowSummary';
/**
 * Predefined Configuration for the Layout Module
 */
export interface LayoutState extends ConfigState {
    /**
     * Layout which will be loaded when AdapTable starts - must match `Name` property in Layout
     */
    CurrentLayout?: string;
    /**
     * Collection of Layout objects - listed in Layout toolbar and Tool Panel
     */
    Layouts?: Layout[];
}
/**
 * Defines a Layout; contains everything required i.e. Columns, Sorts, Widths, Aggregations, Grouping & Pivoting
 */
export interface Layout extends AdaptableObject {
    /**
     * Name of Layout as will appear in Layout toolbar and tool panel
     */
    Name: string;
    /**
     * Which columns should be visible in the Layout and in which order
     */
    Columns: string[];
    /**
     * Set of widths for some (or all columns)
     */
    ColumnWidthMap?: {
        [columnId: string]: number;
    };
    /**
     * Sorting to apply in the Layout
     */
    ColumnSorts?: ColumnSort[];
    /**
     * Collection of Column Filters.
     */
    ColumnFilters?: ColumnFilter[];
    /**
     * Grid Filter to apply for the Layout
     */
    GridFilter?: GridFilter;
    /**
     * Columns which are row-grouped when the Layout is applied
     */
    RowGroupedColumns?: string[];
    /**
     * Opened Row Groups - set if `displayRowGroups` in LayoutOptions is 'dynamic'
     */
    ExpandedRowGroupValues?: any[];
    /**
     * Columns showing aggregated values in Group Rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
     */
    AggregationColumns?: AggregationColumns;
    /**
     * Whether pivoting should be enabled in the Grid when this Layout loads
     */
    EnablePivot?: boolean;
    /**
     * List of Columns which should be pivoted when grid is in pivot mode
     */
    PivotColumns?: string[];
    /**
     * Set of pinned Columns
     */
    PinnedColumnsMap?: {
        [columnId: string]: 'left' | 'right';
    };
    /**
     * Set of custom header names for some (or all columns)
     */
    ColumnHeadersMap?: {
        [columnId: string]: string;
    };
    /**
     * Whether to include the aggFunc name in the column header: e.g. 'sum(Bank Balance)' will just be 'Bank Balance'
     */
    SuppressAggFuncInHeader?: boolean;
    /**
     * Row Summaries - Pinned Rows that display Aggregation Info for a whole column
     */
    RowSummaries?: RowSummary[];
}
