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

import auth, { InitStateAuth } from "./auth"

import invoice, { InitStateInvoice } from './invoice'
import cart from './cart'
import { Cart } from "../../model/cart";
import product, { InitStateProduct } from "./product";
import { authPersistedReducer } from "../store";

export type RootState = {
  auth: InitStateAuth,
  invoice: InitStateInvoice,
  cart: Cart,
  product: InitStateProduct
}


const rootReducer = combineReducers({
  auth,
  invoice,
  cart,
  product,
});

export default rootReducer;