import { BaseState } from './BaseState';
import { AdaptableObject } from './Common/AdaptableObject';
import { AdaptableAggregatedScalarQuery, AdaptableScalarQuery } from './Common/AdaptableQuery';
import { SpecialColumnSettings } from './Common/SpecialColumnSettings';
import { XOR } from '../Utilities/Extensions/TypeExtensions';
/**
 * Adaptable State Section for Calculated Column Module
 **/
export interface CalculatedColumnState extends BaseState {
    /**
     * Collection of Calculated Columns
     */
    CalculatedColumns?: CalculatedColumn[];
}
/**
 *  Defines a Column where the display value is derived from other values in row, and the definition is stored in State.
 */
export interface CalculatedColumn extends AdaptableObject {
    /**
     * Name of Calculated Column
     */
    ColumnId: string;
    /**
     * Name to be used in Column Header; if blank `ColumnId` is used
     */
    FriendlyName?: string;
    /**
     * Additional optional properties for Column (e.g. filterable, resizable)
     */
    CalculatedColumnSettings: CalculatedColumnSettings;
    /**
     * Scalar/AggregatedScalar Query used by AdapTableQL to evaluate Column's value
     */
    Query: AdaptableCalculatedColumnQuery;
}
/**
 * Set properties that define Calculated Column's behaviour (all optional except DataType)
 */
export interface CalculatedColumnSettings extends SpecialColumnSettings {
    /**
     * Show underlying Expression as ToolTip when hovering over a cell
     * @defaultValue false
     */
    ShowToolTip?: boolean;
}
/**
 * Calculated Column Query which may be a Scalar or an AggregatedScalar Expression
 */
export type AdaptableCalculatedColumnQuery = XOR<AdaptableScalarQuery, AdaptableAggregatedScalarQuery>;
