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

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

export {
  payoutsQueryKeys,
  usePayout,
  usePayouts
};
