import { useQuery } from "@tanstack/react-query";
import { QUERY_KEYS } from "@/utils/query-key";
import { getPaymentMethodsReport } from "./_requests";
import { PaymentMethodsFilters } from "./_models";

export const usePaymentMethodsReport = (filters: PaymentMethodsFilters) => {
  return useQuery({
    queryKey: [QUERY_KEYS.GET_PAYMENT_METHODS_REPORT, filters],
    queryFn: () => getPaymentMethodsReport(filters),
    enabled: filters.limit > 0,
  });
};

