import { getAllNodes } from '@rss3/api-core';
import { useQuery } from '@tanstack/react-query';

function useGetAllNodes(params, options) {
  const queryKey = ["useGetAllNodes", params];
  const query = useQuery({
    queryKey,
    queryFn: () => {
      const args = Array.isArray(params) ? params : [params];
      return getAllNodes(...args);
    },
    ...options
  });
  return {
    ...query,
    queryKey
  };
}

export { useGetAllNodes };
//# sourceMappingURL=use-get-all-nodes.js.map
//# sourceMappingURL=use-get-all-nodes.js.map