import { API_ENDPOINTS, userService } from "@/lib/api";
import { useQuery } from "@tanstack/react-query";
import { useMemo } from "react";

export const useGetAdminListQuery = (params?: Record<string, any>) => {
  const queryKey = useMemo(() => [API_ENDPOINTS.USER.ADMINS, params], [params]);
  return useQuery({
    queryKey,
    queryFn: () => userService.adminsList(params),
  });
};