import {
  queryKeysFactory
} from "./chunk-ZA2KFUFR.js";
import {
  sdk
} from "./chunk-DTGEFKK4.js";

// src/hooks/api/payouts.tsx
import { useQuery } from "@tanstack/react-query";
var PAYOUTS_QUERY_KEY = "payouts";
var payoutsQueryKeys = queryKeysFactory(PAYOUTS_QUERY_KEY);
var usePayouts = (query, options) => {
  const { data, ...rest } = useQuery({
    queryKey: payoutsQueryKeys.list(query),
    queryFn: async () => sdk.vendor.payouts.query({ ...query }),
    ...options
  });
  return { ...data, ...rest };
};
var usePayout = (id, query, options) => {
  const { data, ...rest } = useQuery({
    queryKey: payoutsQueryKeys.detail(id, query),
    queryFn: async () => sdk.vendor.payouts.$id.query({ $id: id, ...query }),
    ...options
  });
  return { ...data, ...rest };
};

export {
  usePayouts,
  usePayout
};
