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

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

const KEY = "branch";

export const useGetAllBranch = (params?: any, options?: any) =>
  useGetQuery(KEY, API.GET, params, options);
export const useAddBranch = () => useAddMutation(KEY, API.ADD);
export const useUpdateBranch = (params?: any) =>
  useUpdateMutation(KEY, API.GET);
export const useDeleteBranch = (params?: any) =>
  useDeleteMutation(KEY, API.DELETE);
