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

export const useShipmentsByMethodReport = (filters: ShipmentsByMethodFilters) => {
  return useQuery({
    queryKey: [QUERY_KEYS.GET_SHIPMENTS_BY_METHOD_REPORT, filters],
    queryFn: () => getShipmentsByMethodReport(filters),
    enabled: filters.limit > 0,
  });
};

