import useAddMutation from "./helper/useAddMutation";
import useDeleteMutation from "./helper/useDeleteMutation";
import useGetQuery from "./helper/useGetQuery";
import useUpdateMutation from "./helper/useUpdateMutation";

const API = {
  GET: "/payment",
  OVERVIEW: "/payment/overview",

  ADD: "/payment",
  DELETE: "/payment",
  UPDATE: "/payment",
};

const KEY = "payment";

export const useGetAllPayment = (params?: any, options?: any) =>
  useGetQuery(KEY, API.GET, params, options);
export const useAddPayment = () => useAddMutation(KEY, API.ADD);
export const useUpdatePayment = (params?: any) =>
  useUpdateMutation(KEY, API.GET);
export const useDeletePayment = (params?: any) =>
  useDeleteMutation(KEY, API.DELETE);

export const useGetOverView = (params?: any, options?: any) =>
  useGetQuery(KEY, API.OVERVIEW, params, options);
