import * as api from "../service/Service";
import { useMutation } from "@tanstack/react-query";
import { CreateCompanyType } from "../types/Types";

export const useCreateCompany = () => {
  return useMutation({
    mutationFn: (data: CreateCompanyType) => api.createCompany(data),
  });
};

export const useSingleUpload = () => {
  return useMutation({
    mutationFn: (variables: FormData) => api.uploadSingle(variables),
  });
};
export const useMultiUpload = () => {
  return useMutation({
    mutationFn: (variables: FormData) => api.uploadMultiple(variables),
  });
};

export const useCreateService = () => {
  return useMutation({
    mutationFn: (variables: CreateCompanyType) => api.createCompany(variables),
  });
};
