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

const messageSlice = createSlice({
  name: "message",
  initialState: {
    open:false,
    snackbar:{
      autoHideDuration:2000,
      anchorOrigin:{
        vertical: 'bottom',
        horizontal: 'right',
      }
    },
    type:"success",
    content:""
  },
  reducers: {
    changemessage: (state, { payload }) => {
      return payload;
    },
  },
});

export const { changemessage } = messageSlice.actions;

export default messageSlice.reducer;
