
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";
  
const API = {
  ADD: `order`,
  GET_ALL: `order`,
  DELETE: `order`,
  UPDATE: `order`,

};
const KEY = "Order"


export const useGetOrder = (params?:any) => useGetQueryPagination(KEY, API.GET_ALL,params,{},"coupon");
export const useGetOneOrder = (params?:any) => useGetOneQuery(KEY, API.GET_ALL,params);

export const useAddOrder = () => useAddMutation(KEY, API.ADD);
export const useUpdateOrder = (method?:any) => useUpdateMutation(KEY, API.UPDATE,true,method);

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


export const  useAcceptOrder = ()=> useAddMutation(KEY, API.ADD)
export const  useCancelOrder = ()=> useAddMutation(KEY, API.ADD)
export const  useDeliverOrder = ()=> useAddMutation(KEY, API.ADD)
export const  useDeliveredOrder = ()=> useAddMutation(KEY, API.ADD)

