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

export const useProfitLossReport = (filters?: ProfitLossFilters) => {
  return useQuery({
    queryKey: [QUERY_KEYS.GET_PROFIT_LOSS_REPORT, filters],
    queryFn: () => getProfitLossReport(filters),
  });
};
