
import useGetQueryPagination from "./helper/ueGetPagination";
import useAddMutation from "./helper/useAddMutation"
import useDeleteMutation from "./helper/useDeleteMutation"
import useUpdateMutation from "./helper/useUpdateMutation"

const API = {
  GET: "/api/product",
  ADD: "/api/product",
  UPDATE: "/api/product",
  DELETE: "/api/product",
};

const KEY = "PRODUCT";
export const useGetProduct = (params?: any) => useGetQueryPagination(KEY, API.GET, params);
export const useAddProduct = () => useAddMutation(KEY, API.ADD);
export const useUpdateProduct = () => useUpdateMutation(KEY, API.UPDATE);
export const useDeleteProduct = () => useDeleteMutation(KEY, API.DELETE);
