import { _ as y, v as u } from "../vendor-preact-DThS2ZQ_.js";
import { c as useManager, o as useModuleTerminalCallbacks } from "../hooks-Da_yP_Dr.js";
import { t as IncodeComponent } from "../incodeComponent-CCP7GTMj.js";
import { t as Spinner } from "../spinner-DqB4SGUV.js";
import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.js";
import { createCrossDocumentDataMatchManager } from "@incodetech/core/cross-document-data-match";
//#region src/modules/cross-document-data-match/cross-document-data-match.tsx
var CrossDocumentDataMatchContent = ({ onFinish }) => {
	const [state, manager] = useManager(() => createCrossDocumentDataMatchManager());
	y(() => {
		manager.load();
	}, [manager]);
	useModuleTerminalCallbacks({
		status: state.status === "finished" ? "finished" : "loading",
		onFinish
	});
	return /* @__PURE__ */ u(Spinner, { fullScreen: true });
};
var CrossDocumentDataMatch = ({ onFinish }) => /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u(CrossDocumentDataMatchContent, { onFinish }) });
registerIncodeModuleElement(CrossDocumentDataMatch, "incode-cross-document-data-match");
//#endregion
export { CrossDocumentDataMatch };
