;
{
  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] = "004240a0-b954-4f2e-843b-bd82f8213542", e._sentryDebugIdIdentifier = "sentry-dbid-004240a0-b954-4f2e-843b-bd82f8213542");
  } catch (e) {
  }
}
;
import { useMutation } from "@tanstack/preact-query";
import { a as useInvalidateRootLegalEntity } from "./useToastContext-CPvuqSMm.js";
import { b as useApiContext, ad as httpDelete } from "./StoreProvider-CqQrndhS.js";
const deleteTransferInstrument = async (legalEntityId, baseUrl, transferInstrumentId) => {
  return httpDelete({
    baseUrl,
    path: `legalEntities/${legalEntityId}/transferInstruments/${transferInstrumentId}`
  });
};
const useDeleteTransferInstrument = (options) => {
  const { rootLegalEntityId, baseUrl } = useApiContext();
  const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
  return useMutation({
    mutationFn: (transferInstrumentId) => deleteTransferInstrument(rootLegalEntityId.value, baseUrl.value, transferInstrumentId),
    onSuccess: async () => {
      await invalidateRootLegalEntity();
    },
    ...options
  });
};
export {
  useDeleteTransferInstrument as u
};
