
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: `coupon`,
  GET_ALL: `coupon`,
  DELETE: `coupon`,
  UPDATE: `coupon`,

};
const KEY = "COUPON"


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

export const useAddCoupon = () => useAddMutation(KEY, API.ADD);
export const useUpdateCoupon = (method:any) => useUpdateMutation(KEY, API.UPDATE,true,method);

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