var _a;
import { createSlice } from '@reduxjs/toolkit';
import { Context } from '../../../context/Context';
var config = { AppId: "3043eb1d6100457f9dcad1162237e8ff", Uid: Math.floor(Math.random() * 100) };
var initialState = { context: new Context(config) };
export var context = createSlice({
    name: 'context',
    initialState: initialState,
    reducers: {
        setContext: function (state, action) {
            state.context = action.payload.context ? action.payload.context : state.context;
        },
        clearContext: function (state) {
            state = initialState;
        },
        editContext: function (state, action) {
        }
    },
});
// Action creators are generated for each case reducer function
export var setContext = (_a = context.actions, _a.setContext), clearContext = _a.clearContext, editContext = _a.editContext;
export default context.reducer;
