import * as api from "../service/HomeService";
import { useMutation, useQuery } from "@tanstack/react-query";

export const useQuikAccess = () => {
  return useMutation({
    mutationFn: (variables: string) => api.quikAccess(variables),
  });
};

export const useGetQuikAccess = () => {
  return useQuery({
    queryKey: ["quik-access"],
    queryFn: () => api.getQuikAccess(),
  });
};

export const useGetDashboardSummary = () => {
  return useQuery({
    queryKey: ["dashboard-summary"],
    queryFn: () => api.getDashboardSummary(),
  });
};

export const useRemoveQuikAccess = () => {
  return useMutation({
    mutationFn: (variables: string) => api.removeQuikAccess(variables),
  });
};
