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

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

const KEY = "earlyDeparture";

export const useGetAllEarlyDeparture = (params?: any, options?: any) =>
  useGetQuery(KEY, API.GET, params, options);
export const useAddEarlyDeparture = () => useAddMutation(KEY, API.ADD);
export const useUpdateEarlyDeparture = (params?: any) =>
  useUpdateMutation(KEY, API.UPDATE, params);
export const useDeleteEarlyDeparture = (params?: any) =>
  useDeleteMutation(KEY, API.DELETE);
