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] = "85bb35ff-a9d9-4b0d-b982-617c920d49a5", e._sentryDebugIdIdentifier = "sentry-dbid-85bb35ff-a9d9-4b0d-b982-617c920d49a5");
} catch (e) {}
import { n as addResourceBundles, r as useTranslation } from "./translation-Br5wIPO-.js";
import { r as Loader } from "./Button-BDEdGXnd.js";
import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-CCXvMgfE.js";
import { AdaptiveWorkflow, n as useAdaptiveWorkflow, t as WorkflowContext } from "./AdaptiveWorkflow-D3WOUCtY.js";
import { useMemo } from "preact/hooks";
import { jsx } from "preact/jsx-runtime";
import { signal } from "@preact/signals";
//#region src/context/WorkflowContext/WorkflowContextProvider.tsx
/**
* To manage global variables and entity details returned from AWE
*/
var createWorkflowStore = () => {
	const globals = signal({});
	const entity = signal(void 0);
	const taskStatuses = signal({});
	return {
		globals,
		entity,
		setGlobals: (val) => globals.value = val,
		setEntity: (val) => entity.value = val,
		updateGlobals: (val) => globals.value = {
			...globals.value,
			...val
		},
		taskStatuses,
		setTaskStatuses: (statuses) => taskStatuses.value = statuses,
		updateTaskStatus: (taskId, status) => taskStatuses.value = {
			...taskStatuses.value,
			[taskId]: status
		}
	};
};
function WorkflowContextProvider({ children }) {
	const store = useMemo(() => createWorkflowStore(), []);
	return /* @__PURE__ */ jsx(WorkflowContext.Provider, {
		value: store,
		children
	});
}
//#endregion
//#region src/components/EmbeddedDropins/AdaptiveWorkflowComponent/AdaptiveWorkflowComponent.tsx
/**
* The component which will be used to render an adaptive UI based on a response from the
* Adaptive Workflow Engine (AWE). AWE uses the Requirements Engine (RE) to determine what
* data points are required from a user based what products they have requested and then uses these
* requirements to generate a UI Manifest that this component will use to render a UI.
*/
var AdaptiveWorkflowComponent = ({ onBack }) => {
	const { data: uiManifest, isRefetching } = useAdaptiveWorkflow();
	const { i18n } = useTranslation();
	addResourceBundles(i18n, [
		{
			ns: "adaptive",
			importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({ "../../../adaptiveWorkflow/language/en-US.json": () => import("./en-US-Cep-b_Ek.js") }), `../../../adaptiveWorkflow/language/${lang}.json`, 6)
		},
		{
			ns: "common",
			importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
				"../../../language/locales/bg-BG.json": () => import("./bg-BG-NwL6SZRu.js"),
				"../../../language/locales/cs-CZ.json": () => import("./cs-CZ-BZkot6xs.js"),
				"../../../language/locales/da-DK.json": () => import("./da-DK-Bc6oX5Ct.js"),
				"../../../language/locales/de-DE.json": () => import("./de-DE-JZBqb8ce.js"),
				"../../../language/locales/el-GR.json": () => import("./el-GR-C8jFvyDg.js"),
				"../../../language/locales/en-US.instructions.json": () => import("./en-US.instructions-DlxMDbRu.js"),
				"../../../language/locales/en-US.json": () => import("./en-US-Cq6Cl6Yl.js"),
				"../../../language/locales/es-ES.json": () => import("./es-ES-mdSA-CIT.js"),
				"../../../language/locales/et-EE.json": () => import("./et-EE-B4ZMHksf.js"),
				"../../../language/locales/fi-FI.json": () => import("./fi-FI-koFpyMaq.js"),
				"../../../language/locales/fr-FR.json": () => import("./fr-FR-B0eVVc8V.js"),
				"../../../language/locales/hr-HR.json": () => import("./hr-HR-D_X-RNUl.js"),
				"../../../language/locales/hu-HU.json": () => import("./hu-HU-3FpAw9b1.js"),
				"../../../language/locales/it-IT.json": () => import("./it-IT-BgULENxX.js"),
				"../../../language/locales/ja-JP.json": () => import("./ja-JP-BT70_5Cd.js"),
				"../../../language/locales/lt-LT.json": () => import("./lt-LT-CKltvr9j.js"),
				"../../../language/locales/lv-LV.json": () => import("./lv-LV-DwsdNJrk.js"),
				"../../../language/locales/nl-NL.json": () => import("./nl-NL-CxlTSECX.js"),
				"../../../language/locales/no-NO.json": () => import("./no-NO-FtH9gIpv.js"),
				"../../../language/locales/pl-PL.json": () => import("./pl-PL-CK40GB3R.js"),
				"../../../language/locales/pt-BR.json": () => import("./pt-BR-zUBVM8_b.js"),
				"../../../language/locales/pt-PT.json": () => import("./pt-PT-CxnB9Jff.js"),
				"../../../language/locales/ro-RO.json": () => import("./ro-RO-Cuw1RmFc.js"),
				"../../../language/locales/sk-SK.json": () => import("./sk-SK-1i0L4zIs.js"),
				"../../../language/locales/sl-SI.json": () => import("./sl-SI-D3zK3MPP.js"),
				"../../../language/locales/sv-SE.json": () => import("./sv-SE-CVRa-6Y0.js")
			}), `../../../language/locales/${lang}.json`, 6)
		},
		{
			ns: "ui",
			importFn: (lang) => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
				"../../ui/language/bg-BG.json": () => import("./bg-BG-IjNKw0Zu.js"),
				"../../ui/language/cs-CZ.json": () => import("./cs-CZ-B6AZX4nL.js"),
				"../../ui/language/da-DK.json": () => import("./da-DK-B8aHvZ1W.js"),
				"../../ui/language/de-DE.json": () => import("./de-DE-cPL-uSMG.js"),
				"../../ui/language/el-GR.json": () => import("./el-GR-BDXwftjw.js"),
				"../../ui/language/en-US.json": () => import("./en-US-_l9425V1.js"),
				"../../ui/language/es-ES.json": () => import("./es-ES-D67pkLVu.js"),
				"../../ui/language/et-EE.json": () => import("./et-EE-Dg93VJbx.js"),
				"../../ui/language/fi-FI.json": () => import("./fi-FI-BNtrKnDN.js"),
				"../../ui/language/fr-FR.json": () => import("./fr-FR-DYDmBWWT.js"),
				"../../ui/language/hr-HR.json": () => import("./hr-HR-DbebVQF9.js"),
				"../../ui/language/hu-HU.json": () => import("./hu-HU-e9KN8lp6.js"),
				"../../ui/language/it-IT.json": () => import("./it-IT-16IjDttL.js"),
				"../../ui/language/ja-JP.json": () => import("./ja-JP-CJY6uqPb.js"),
				"../../ui/language/lt-LT.json": () => import("./lt-LT-BVVTYN3z.js"),
				"../../ui/language/lv-LV.json": () => import("./lv-LV-BeobSRYx.js"),
				"../../ui/language/nl-NL.json": () => import("./nl-NL-DKpjFbpm.js"),
				"../../ui/language/no-NO.json": () => import("./no-NO-CG5RteG_.js"),
				"../../ui/language/pl-PL.json": () => import("./pl-PL-R6bNjSQB.js"),
				"../../ui/language/pt-BR.json": () => import("./pt-BR-VlNZLr8f.js"),
				"../../ui/language/pt-PT.json": () => import("./pt-PT-Dmor9x6o.js"),
				"../../ui/language/ro-RO.json": () => import("./ro-RO-BRtHlgch.js"),
				"../../ui/language/sk-SK.json": () => import("./sk-SK--ohjuOMW.js"),
				"../../ui/language/sl-SI.json": () => import("./sl-SI-DWJzi8r_.js"),
				"../../ui/language/sv-SE.json": () => import("./sv-SE-DTpqjuJd.js")
			}), `../../ui/language/${lang}.json`, 5)
		}
	]);
	const loaderMessage = isRefetching ? "Checking everything over. Just a minute." : void 0;
	if (!uiManifest || isRefetching) return /* @__PURE__ */ jsx(Loader, { shortMessage: loaderMessage });
	return /* @__PURE__ */ jsx(WorkflowContextProvider, { children: /* @__PURE__ */ jsx(AdaptiveWorkflow, {
		uiManifest,
		onBack
	}) });
};
//#endregion
export { AdaptiveWorkflowComponent };
