import { createSlice } from "@reduxjs/toolkit";

const localVariablesSlice = createSlice({
  name: "localVariables",
  initialState: {
    selectedMaster:"Application Role",
    regularizationCount:0,
    projectId: 1,
    reload:false
  
  },
  reducers: {
    changeMaster: (state, action) => {
        state.selectedMaster = action.payload;
    },
    updateRegularizationCount: (state, action) => {
      state.regularizationCount = action.payload;
    },
    setProjectId: (state, action) => { 
      state.projectId = action.payload;
    },
    refreshData: ( state, action ) =>
    {
      state.reload = action.payload
    }
  },
});

export const { changeMaster ,updateRegularizationCount,setProjectId,refreshData} = localVariablesSlice.actions;
export default localVariablesSlice.reducer;
