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

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

const KEY = "homework";

export const useGetAllHomework = (params?: any) =>
  useGetQuery(KEY, API.GET, params);
export const useAddHomework = () => useAddMutation(KEY, API.ADD);
export const useUpdateHomework = (params?: any) =>
  useUpdateMutation(KEY, API.UPDATE, params);
export const useDeleteHomework = (params?: any) =>
  useDeleteMutation(KEY, API.DELETE);
