import { configureStore } from "@reduxjs/toolkit";
import notificationSlice from "./features/ui/notification.slice";
import userdataSlice from "./features/ui/userdata.slice";
import modalSlice from "./features/ui/modal.slice";
import toastSlice from "./features/ui/toast.slice";
import gallerySlice from "./features/data/gallery.slice";
import uploadSlice from "./features/data/upload.slice";
import miniwindowSlice from "./features/ui/miniwindow.slice";
import searchSlice from "./features/data/search.slice";
import useronlineSlince from "./features/data/useronline.slice";
import postLock from "./features/data/post.lock";

export default configureStore({
  reducer: {
    // ui
    notification: notificationSlice,
    user: userdataSlice,
    modal: modalSlice,
    toast: toastSlice,
    miniwindow: miniwindowSlice,
    // data
    gallery: gallerySlice,
    upload: uploadSlice,
    search: searchSlice,
    useronline: useronlineSlince,
    postlock: postLock,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: false,
    }),
});
