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

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

export { useGetNodeEvents };
//# sourceMappingURL=use-get-node-events.js.map
//# sourceMappingURL=use-get-node-events.js.map