import { useMutation } from "@tanstack/react-query";
import { getGitpodService } from "../../service/service";
import { useCurrency } from "../../payment-context";
export const useCreateHoldPaymentIntentMutation = () => {
const { currency } = useCurrency();
return useMutation(async (attributionId: string) => {
await getGitpodService().server.createStripeCustomerIfNeeded(attributionId, currency);
return await getGitpodService().server.createHoldPaymentIntent(attributionId);
});
};