
import useGetQueryPagination from "./helper/ueGetPagination";
import useAddMutation from "./helper/useAddMutation"
import useDeleteMutation from "./helper/useDeleteMutation"
import useGetOneQuery from "./helper/useGetOneQuery";
import useGetQuery from "./helper/useGetQuery"
import useUpdateMutation from "./helper/useUpdateMutation";
import useUpdateMutationPost from "./helper/useUpdateMutationPut";
  
const API = {
  ADD: `category`,
  GET_ALL: `category`,
  DELETE: `category`,
  UPDATE: `category`,

};
const KEY = "CATEGORIES"


export const useGetCategories = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params);
export const useGetOneCategories = () => useGetOneQuery(KEY, API.GET_ALL);

export const useAddCategories = () => useAddMutation(KEY, API.ADD);
export const useUpdateCategories = (method?:any) => useUpdateMutationPost(KEY, API.UPDATE,true,method);

export const useDeleteCategories = () =>useDeleteMutation(KEY, API.DELETE);
