import { BaseState } from './BaseState';
import { AdaptableStyle } from './Common/AdaptableStyle';
import { AdaptableColumnPredicate, ColumnScope } from '../types';
import { XOR } from '../Utilities/Extensions/TypeExtensions';
import { AdaptableBooleanQuery } from './Common/AdaptableQuery';
import { TypeHint } from './Common/Types';
import { AdaptableObject, SuspendableObject } from '../../types';
/**
 * Adaptable State Section for Flashing Cell module
 */
export interface FlashingCellState extends BaseState {
    /**
     * Flashing Cell Definitions - will flash cells/rows when rule is met
     */
    FlashingCellDefinitions?: FlashingCellDefinition[];
}
/**
 * Predicates available when using Flashing Cells
 */
export interface FlashingCellDefinitionPredicate extends AdaptableColumnPredicate {
    PredicateId: TypeHint<string, SystemFlashingCellPredicateId>;
}
/**
 * The Flashing Cell Rule - either an AdaptablePredicate or an AdaptableQuery
 */
export type FlashingCellRule = XOR<{
    Predicates: FlashingCellDefinitionPredicate[];
}, AdaptableBooleanQuery>;
/**
 * What should flash? row, cell or aggregated cell
 */
export type FlashTargetTypes = 'row' | 'cell' | 'aggFuncCell';
/**
 * The Flashing Cell Definition
 */
export interface FlashingCellDefinition extends AdaptableObject, SuspendableObject {
    /**
     * Name of the Flashing Cell Definition
     */
    Name: string;
    /**
     * Which Columns, DataTypes or Column Types can Flash
     */
    Scope: ColumnScope;
    /**
     * When Flashing Cell should be triggered
     */
    Rule: FlashingCellRule;
    /**
     * Should a cell or whole row flash
     * @defaultValue  'cell'
     */
    FlashTarget?: FlashTargetTypes | FlashTargetTypes[];
    /**
     * Style for 'Down' value changes
     *  @defaultValue  Red BackColour
     */
    DownChangeStyle?: AdaptableStyle;
    /**
     * Style for 'Up' value changes
     * @defaultValue  Green BackColour
     */
    UpChangeStyle?: AdaptableStyle;
    /**
     * Style for 'Neutral' value changes
     * @defaultValue  Gray BackColour
     */
    NeutralChangeStyle?: AdaptableStyle;
    /**
     * Duration of Flash - can be number (in ms) or 'always'
     * @defaultValue 500ms
     */
    FlashDuration?: number | 'always';
}
/**
 * Array containing all System Flashing Cell Predicates
 */
export type SystemFlashingCellPredicateIds = SystemFlashingCellPredicateId[];
/**
 * List of System Predicates available for Flashing Cells
 */
export type SystemFlashingCellPredicateId = 'Blanks' | 'NonBlanks' | 'Equals' | 'NotEquals' | 'GreaterThan' | 'LessThan' | 'Positive' | 'Negative' | 'Zero' | 'Between' | 'NotBetween' | 'Is' | 'IsNot' | 'Contains' | 'NotContains' | 'StartsWith' | 'EndsWith' | 'Regex' | 'Today' | 'Yesterday' | 'Tomorrow' | 'ThisWeek' | 'ThisMonth' | 'ThisQuarter' | 'ThisYear' | 'InPast' | 'InFuture' | 'Before' | 'After' | 'On' | 'NotOn' | 'NextWorkDay' | 'LastWorkDay' | 'WorkDay' | 'Holiday' | 'True' | 'False' | 'PercentChange' | 'In' | 'NotIn' | 'AnyChange';
