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] = "91c4cdcd-6e09-4de0-8397-794265123404", e._sentryDebugIdIdentifier = "sentry-dbid-91c4cdcd-6e09-4de0-8397-794265123404");
} catch (e) {}
import { s as useApiContext, t as httpDelete } from "./http-CHTzpXCd.js";
import { t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-BHyct4ev.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 };
