text: import {applyMiddleware, combineReducers, createStore} from "redux";
  import thunk from "redux-thunk";
  import {composeWithDevTools} from "redux-devtools-extension";
  import {
      productCreateReducer,
      productDeleteReducer,
      productDetailsReducer,
      productListReducer,
      productReviewReducer,
      productUpdateReducer,
  } from "./redux/reducers/productsReducers";
  import {cartReducer} from "./redux/reducers/cartReducers";
  import {
      updateUserReducer,
      userdeleteReducer,
      userDetailsReducer,
      userListReducer,
      userLoginReducer,
      userRegisterReducer,
      userUpdateReducer,
  } from "./redux/reducers/userReducers";
  import {
      orderCreateReducer,
      orderDeliverReducer,
      orderDetailsReducer,
      orderListMyReducer,
      orderListReducer,
      orderPayReducer,
  } from "./redux/reducers/orderReducers";
  
  const reducer = combineReducers({
      productList: productListReducer,
      productDetails: productDetailsReducer,
      deleteProduct: productDeleteReducer,
      createProduct: productCreateReducer,
      updateProduct: productUpdateReducer,
      productReview: productReviewReducer,
      cart: cartReducer,
      userLogin: userLoginReducer,
      userRegister: userRegisterReducer,
      userDetails: userDetailsReducer,
      userUpdateProfile: userUpdateReducer,
      userList: userListReducer,
      userDelete: userdeleteReducer,
      userUpdate: updateUserReducer,
      orderCreate: orderCreateReducer,
      orderDetails: orderDetailsReducer,
      orderPay: orderPayReducer,
      orderDeliver: orderDeliverReducer,
      orderMyList: orderListMyReducer,
      orderList: orderListReducer,
  });
  
  const cartItemsFromLocalStorage = localStorage.getItem("cartItems")
      ? JSON.parse(localStorage.getItem("cartItems"))
      : [];
  
  const userInfoFromLocalStorage = localStorage.getItem("userInfo")
      ? JSON.parse(localStorage.getItem("userInfo"))
      : null;
  
  const shippingAddressFromLocalStorage = localStorage.getItem("shippingAddress")
      ? JSON.parse(localStorage.getItem("shippingAddress"))
      : {};
  
  const paymentMethodFromLocalStorage = localStorage.getItem("paymentMethod")
      ? JSON.parse(localStorage.getItem("paymentMethod"))
      : {};
  
  const initialState = {
      cart: {
          cartItems: cartItemsFromLocalStorage,
          shippingAddress: shippingAddressFromLocalStorage,
          paymentMethod: paymentMethodFromLocalStorage,
      },
      userLogin: {
          userInfo: userInfoFromLocalStorage,
      },
  };
  
  const middleWares = [thunk];
  
  const store = createStore(
      reducer,
      initialState,
      composeWithDevTools(applyMiddleware(...middleWares))
  );
  
  export default store;
  