try {
	let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
	n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "6be6d039-71a2-4d16-9a21-dcb2f63f088e", e._sentryDebugIdIdentifier = "sentry-dbid-6be6d039-71a2-4d16-9a21-dcb2f63f088e");
} catch (e) {}
import { s as useApiContext, t as httpDelete } from "./http-BN5CG8KV.js";
import { t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-D4KFKwkm.js";
import { useMutation } from "@tanstack/preact-query";
//#region src/api/transferInstruments/useDeleteTransferInstrument.ts
var deleteTransferInstrument = async (legalEntityId, baseUrl, transferInstrumentId) => {
	return httpDelete({
		baseUrl,
		path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
	});
};
/**
* Deletes a transfer instrument associated with a legal entity
* @param options additional options passed to Tanstack Query, eg; onSuccess
*/
var useDeleteTransferInstrument = (options) => {
	const { rootLegalEntityId, baseUrl } = useApiContext();
	const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
	return useMutation({
		mutationFn: (transferInstrumentId) => deleteTransferInstrument(rootLegalEntityId.value, baseUrl.value, transferInstrumentId),
		onSuccess: async () => {
			await invalidateRootLegalEntity();
		},
		...options
	});
};
//#endregion
export { useDeleteTransferInstrument as t };
