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

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

export { useGetEpochs };
//# sourceMappingURL=use-get-epochs.js.map
//# sourceMappingURL=use-get-epochs.js.map