"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PluginsReducer = exports.PluginsSetPluginState = exports.OPENFIN_SET_CURRENT_REPORTNAME = exports.OPENFIN_SET_RUNNING_OFF = exports.OPENFIN_SET_RUNNING_ON = exports.OPENFIN_SET_AVAILABLE_OFF = exports.OPENFIN_SET_AVAILABLE_ON = exports.OPENFIN_LIVE_REPORT_CLEAR = exports.OPENFIN_LIVE_REPORT_SET = exports.OPENFIN_STOP_LIVE_DATA = exports.OPENFIN_START_LIVE_DATA = exports.IPUSHPULL_SET_AVAILABLE_PAGES = exports.IPUSHPULL_SET_CURRENT_PAGE = exports.IPUSHPULL_SET_CURRENT_FOLDER = exports.IPUSHPULL_SET_CURRENT_REPORTNAME = exports.IPUSHPULL_DOMAIN_PAGES_CLEAR = exports.IPUSHPULL_DOMAIN_PAGES_SET = exports.IPUSHPULL_LIVE_REPORT_CLEAR = exports.IPUSHPULL_LIVE_REPORT_SET = exports.IPUSHPULL_SET_RUNNING_OFF = exports.IPUSHPULL_SET_RUNNING_ON = exports.IPUSHPULL_SET_AVAILABLE_OFF = exports.IPUSHPULL_SET_AVAILABLE_ON = exports.IPUSHPULL_SET_LOGIN_DETAILS = exports.IPUSHPULL_SET_LOGIN_ERROR_MESSAGE = exports.IPUSHPULL_LOGOUT = exports.IPUSHPULL_LOGIN = exports.IPUSHPULL_ADD_PAGE = exports.IPUSHPULL_STOP_LIVE_DATA = exports.IPUSHPULL_START_LIVE_DATA = exports.IPUSHPULL_REPORT_SELECT = exports.IPUSHPULL_SEND_SNAPSHOT = exports.IPUSHPULL_SET_THROTTLE_TIME = exports.PLUGINS_SET_PLUGIN_STATE = void 0;
/**
 * @ReduxAction Plugins have been instantiated
 */
exports.PLUGINS_SET_PLUGIN_STATE = 'PLUGINS_SET_PLUGIN_STATE';
/**
 * @ReduxAction Throttle time for live reports has been set
 */
exports.IPUSHPULL_SET_THROTTLE_TIME = 'IPUSHPULL_SET_THROTTLE_TIME';
/**
 * @ReduxAction A snapshot report has been sent
 */
exports.IPUSHPULL_SEND_SNAPSHOT = 'IPUSHPULL_SEND_SNAPSHOT';
/**
 * @ReduxAction An ipushpull report has been selected
 */
exports.IPUSHPULL_REPORT_SELECT = 'IPUSHPULL_REPORT_SELECT';
/**
 * @ReduxAction Live data has been sent to ipushpull
 */
exports.IPUSHPULL_START_LIVE_DATA = 'IPUSHPULL_START_LIVE_DATA';
/**
 * @ReduxAction Live data to ipushpull has been stopped
 */
exports.IPUSHPULL_STOP_LIVE_DATA = 'IPUSHPULL_STOP_LIVE_DATA';
/**
 * @ReduxAction A new ipushpull page has been added
 */
exports.IPUSHPULL_ADD_PAGE = 'IPUSHPULL_ADD_PAGE';
/**
 * @ReduxAction Logged in to ipushpull
 */
exports.IPUSHPULL_LOGIN = 'IPUSHPULL_LOGIN';
/**
 * @ReduxAction Logged out from ipushpull
 */
exports.IPUSHPULL_LOGOUT = 'IPUSHPULL_LOGOUT';
/**
 * @ReduxAction Error message set from failed login
 */
exports.IPUSHPULL_SET_LOGIN_ERROR_MESSAGE = 'IPUSHPULL_SET_LOGIN_ERROR_MESSAGE';
/**
 * @ReduxAction Login details to ipushpull have been set
 */
exports.IPUSHPULL_SET_LOGIN_DETAILS = 'IPUSHPULL_SET_LOGIN_DETAILS';
/**
 * @ReduxAction ipushpull has been made available
 */
exports.IPUSHPULL_SET_AVAILABLE_ON = 'IPUSHPULL_SET_AVAILABLE_ON';
/**
 * @ReduxAction ipushpull has been made unavailable
 */
exports.IPUSHPULL_SET_AVAILABLE_OFF = 'SET_IPUSHPULL_AVAILABLE_OFF';
/**
 * @ReduxAction ipushpull is now running
 */
exports.IPUSHPULL_SET_RUNNING_ON = 'IPUSHPULL_SET_RUNNING_ON';
/**
 * @ReduxAction ipushpull is no longer running
 */
exports.IPUSHPULL_SET_RUNNING_OFF = 'IPUSHPULL_SET_RUNNING_OFF';
/**
 * @ReduxAction A live report to ipuspull has been set
 */
exports.IPUSHPULL_LIVE_REPORT_SET = 'IPUSHPULL_LIVE_REPORT_SET';
/**
 * @ReduxAction The live report to ipuspull has been cleared
 */
exports.IPUSHPULL_LIVE_REPORT_CLEAR = 'IPUSHPULL_LIVE_REPORT_CLEAR';
/**
 * @ReduxAction ipushpull domain pages have been set
 */
exports.IPUSHPULL_DOMAIN_PAGES_SET = 'IPUSHPULL_DOMAIN_PAGES_SET';
/**
 * @ReduxAction ipushpull domain pages have been cleared
 */
exports.IPUSHPULL_DOMAIN_PAGES_CLEAR = 'IPUSHPULL_DOMAIN_PAGES_CLEAR';
/**
 * @ReduxAction ipushpull set current(selected) report name
 */
exports.IPUSHPULL_SET_CURRENT_REPORTNAME = 'IPUSHPULL_SET_CURRENT_REPORTNAME';
/**
 * @ReduxAction ipushpull set current(selected) folder
 */
exports.IPUSHPULL_SET_CURRENT_FOLDER = 'IPUSHPULL_SET_CURRENT_FOLDER';
/**
 * @ReduxAction ipushpull set current(selected) page
 */
exports.IPUSHPULL_SET_CURRENT_PAGE = 'IPUSHPULL_SET_CURRENT_PAGE';
/**
 * @ReduxAction ipushpull set available pages (depending on current folder)
 */
exports.IPUSHPULL_SET_AVAILABLE_PAGES = 'IPUSHPULL_SET_AVAILABLE_PAGES';
/**
 * @ReduxAction Live data has been sent to OpenFin
 */
exports.OPENFIN_START_LIVE_DATA = 'OPENFIN_START_LIVE_DATA';
/**
 * @ReduxAction Live data is not longer sent to OpenFin
 */
exports.OPENFIN_STOP_LIVE_DATA = 'OPENFIN_STOP_LIVE_DATA';
/**
 * @ReduxAction An OpenFin live report has started
 */
exports.OPENFIN_LIVE_REPORT_SET = 'OPENFIN_LIVE_REPORT_SET';
/**
 * @ReduxAction An OpenFin live report has stopped
 */
exports.OPENFIN_LIVE_REPORT_CLEAR = 'OPENFIN_LIVE_REPORT_CLEAR';
/**
 * @ReduxAction OpenFin is now available
 */
exports.OPENFIN_SET_AVAILABLE_ON = 'OPENFIN_SET_AVAILABLE_ON';
/**
 * @ReduxAction OpenFin is no longer available
 */
exports.OPENFIN_SET_AVAILABLE_OFF = 'OPENFIN_SET_AVAILABLE_OFF';
/**
 * @ReduxAction OpenFin is now running
 */
exports.OPENFIN_SET_RUNNING_ON = 'OPENFIN_SET_RUNNING_ON';
/**
 * @ReduxAction OpenFin is no longer running
 */
exports.OPENFIN_SET_RUNNING_OFF = 'OPENFIN_SET_RUNNING_OFF';
/**
 * @ReduxAction set current(selected) report name
 */
exports.OPENFIN_SET_CURRENT_REPORTNAME = 'OPENFIN_SET_CURRENT_REPORTNAME';
const PluginsSetPluginState = (pluginId, pluginState) => ({
    type: exports.PLUGINS_SET_PLUGIN_STATE,
    pluginId,
    pluginState,
});
exports.PluginsSetPluginState = PluginsSetPluginState;
const initialState = {};
const PluginsReducer = (state = initialState, action) => {
    switch (action.type) {
        case exports.PLUGINS_SET_PLUGIN_STATE: {
            return Object.assign(Object.assign({}, state), { [action.pluginId]: action.pluginState });
        }
        default:
            return state;
    }
};
exports.PluginsReducer = PluginsReducer;
