import { createReducer } from "redux-act";
import { startSnapshotModeAction, stopSnapshotModeAction } from "./actions";
export const initialState = {
    isSnapshotMode: false,
    snapshotCharts: null,
    snapshotDataPoints: null,
};
export const dashboardReducer = createReducer({}, initialState);
dashboardReducer.on(startSnapshotModeAction, (state, { charts, dataPoints }) => ({
    ...state,
    snapshotCharts: charts,
    snapshotDataPoints: dataPoints,
    isSnapshotMode: true,
}));
dashboardReducer.on(stopSnapshotModeAction, (state) => ({
    ...state,
    isSnapshotMode: initialState.isSnapshotMode,
    snapshotCharts: initialState.snapshotCharts,
    snapshotDataPoints: initialState.snapshotDataPoints,
}));
//# sourceMappingURL=reducer.js.map