"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConditionalStyleReducer = exports.ConditionalStyleDelete = exports.CONDITIONAL_STYLE_DELETE = exports.UpdatedRowReducer = exports.UpdatedRowClear = exports.UPDATED_ROW_CLEAR = exports.FlashingCellReducer = exports.FlashingCellClear = exports.FLASHING_CELL_CLEAR = exports.PercentBarReducer = exports.PercentBarClear = exports.PERCENT_BAR_CLEAR = exports.GradientColumnReducer = exports.GradientColumnClear = exports.GRADIENT_COLUMN_CLEAR = void 0;
const initialGradientColumnState = {};
exports.GRADIENT_COLUMN_CLEAR = 'GRADIENT_COLUMN_CLEAR';
const GradientColumnClear = () => ({
    type: exports.GRADIENT_COLUMN_CLEAR,
});
exports.GradientColumnClear = GradientColumnClear;
const GradientColumnReducer = (state = initialGradientColumnState, action) => {
    switch (action.type) {
        case exports.GRADIENT_COLUMN_CLEAR: {
            return Object.assign({}, initialGradientColumnState);
        }
        default:
            return state;
    }
};
exports.GradientColumnReducer = GradientColumnReducer;
const initialPercentBarState = {};
exports.PERCENT_BAR_CLEAR = 'PERCENT_BAR_CLEAR';
const PercentBarClear = () => ({
    type: exports.PERCENT_BAR_CLEAR,
});
exports.PercentBarClear = PercentBarClear;
const PercentBarReducer = (state = initialPercentBarState, action) => {
    switch (action.type) {
        case exports.PERCENT_BAR_CLEAR: {
            return Object.assign({}, initialPercentBarState);
        }
        default:
            return state;
    }
};
exports.PercentBarReducer = PercentBarReducer;
const initialFlashingCellState = {};
exports.FLASHING_CELL_CLEAR = 'FLASHING_CELL_CLEAR';
const FlashingCellClear = () => ({
    type: exports.FLASHING_CELL_CLEAR,
});
exports.FlashingCellClear = FlashingCellClear;
const FlashingCellReducer = (state = initialFlashingCellState, action) => {
    switch (action.type) {
        case exports.FLASHING_CELL_CLEAR: {
            return Object.assign({}, initialFlashingCellState);
        }
        default:
            return state;
    }
};
exports.FlashingCellReducer = FlashingCellReducer;
const initialUpdatedRowState = {};
exports.UPDATED_ROW_CLEAR = 'UPDATED_ROW_CLEAR';
const UpdatedRowClear = () => ({
    type: exports.UPDATED_ROW_CLEAR,
});
exports.UpdatedRowClear = UpdatedRowClear;
const UpdatedRowReducer = (state = initialUpdatedRowState, action) => {
    switch (action.type) {
        case exports.UPDATED_ROW_CLEAR: {
            return Object.assign({}, initialUpdatedRowState);
        }
        default:
            return state;
    }
};
exports.UpdatedRowReducer = UpdatedRowReducer;
const initialConditionalStyleState = {};
exports.CONDITIONAL_STYLE_DELETE = 'CONDITIONAL_STYLE_DELETE';
const ConditionalStyleDelete = (conditionalStyle) => ({
    type: exports.CONDITIONAL_STYLE_DELETE,
    conditionalStyle,
});
exports.ConditionalStyleDelete = ConditionalStyleDelete;
const ConditionalStyleReducer = (state = initialConditionalStyleState, action) => {
    switch (action.type) {
        case exports.CONDITIONAL_STYLE_DELETE: {
            const actionConditionalStyle = action.conditionalStyle;
            return Object.assign(Object.assign({}, state), { ConditionalStyles: state.ConditionalStyles.filter((abObject) => abObject.Uuid !== actionConditionalStyle.Uuid) });
        }
        default:
            return state;
    }
};
exports.ConditionalStyleReducer = ConditionalStyleReducer;
