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

export const slice = createSlice({
    name: 'staticInfo',
    initialState: {
        hisTypeList:[],        //医院类型列表
        statusList:[],      //启/禁用状态列表
        titleList:[],    //职称数据
        dataList: [],    //数据范围
        msgStatusList:[],      //通知状态列表
        msgTypeList:[],     //通知类型列表
    },
    reducers: {
        setStatusList: (state,action) => {
            state.statusList = action.payload;
        },
        setHisTypeList: (state,action) => {
            state.hisTypeList = action.payload;
        },
        setTitleList: (state, action) => {
            state.titleList = action.payload;
        },
        setDataList: (state, action) => {
            state.dataList = action.payload;
        },
        setMsgStatusList: (state, action) => {
            state.msgStatusList = action.payload;
        },
        setMsgTypeList: (state, action) => {
            state.msgTypeList = action.payload;
        },
    },
});

export const { setStatusList, setHisTypeList, setTitleList, setDataList,setMsgStatusList,setMsgTypeList} = slice.actions;

export default slice.reducer;