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

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

const KEY = "admin";

export const useGetAllAdmin = (params?: any, options?: any) =>
  useGetQuery(KEY, API.GET, params, options);
export const useAddAdmin = () => useAddMutation(KEY, API.ADD);
export const useUpdateAdmin = (params?: any) =>
  useUpdateMutation(KEY, API.GET);

export const useDeleteAdmin = (params?: any) =>
  useDeleteMutation(KEY, API.DELETE);
