import { getWorkflowsCacheKey as e } from "./query-keys.js";
import { useApiClient as t } from "./useApi.js";
import { useMutation as n, useQueryClient as r } from "@tanstack/react-query";
//#region src/hooks/useProcessor.ts
function i() {
	let { envKey: i, api: a } = t(), o = r();
	return n({
		mutationFn: (e) => a.processor.runWorkflow(e),
		onSuccess: () => {
			o.invalidateQueries({ queryKey: e(i) });
		}
	});
}
//#endregion
export { i as useRunWorkflow };
