import { createSlice } from "@reduxjs/toolkit";
import { createSelector } from "@reduxjs/toolkit";
import { createNotification } from "@/customHook/useNotification";
import { customerApi } from "@/api/api";

const initialState = {
  category: [],
  loader: false,
};
const categoryStore = createSlice({
  name: "categoryStoreAction",
  initialState: initialState,
  reducers: {
    updateCategory(state, action) {
      state.category = action.payload.category;
    },
    setCategoryLoader(state, action) {
      state.loader = action.payload.loader;
    },
    clearCategory(state) {
      state.category = null;
    },
  },
});

export const categoryStoreActions = categoryStore.actions;

export default categoryStore;
