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] = "bb9d5a7a-fb42-4386-9bbc-99fa06127433", e._sentryDebugIdIdentifier = "sentry-dbid-bb9d5a7a-fb42-4386-9bbc-99fa06127433");
} catch (e) {}
import { r as httpPost, s as useApiContext } from "./http-CHTzpXCd.js";
import { useMutation } from "@tanstack/preact-query";
//#region src/api/createLegalEntity/useCreateLegalEntity.ts
var createLegalEntity = async (legalEntityId, baseUrl, data) => {
	return httpPost({
		baseUrl,
		path: `legalEntities/${legalEntityId}/create`
	}, data);
};
var useCreateLegalEntity = (options) => {
	const { rootLegalEntityId, baseUrl } = useApiContext();
	return useMutation({
		mutationFn: (payload) => {
			return createLegalEntity(rootLegalEntityId.value, baseUrl.value, payload);
		},
		...options
	});
};
//#endregion
export { useCreateLegalEntity as t };
