import "./LazyBackofficeJsonViewer.css.js";
import { Suspense as e, lazy as t } from "react";
import { jsx as n } from "react/jsx-runtime";
import { useTranslation as r } from "react-i18next";
//#region src/backoffice/molecules/backoffice_json_viewer/LazyBackofficeJsonViewer.tsx
var i = t(async () => import("./BackofficeJsonViewerAsync.js")), a = (e, t = "Failed to serialize JSON") => {
	try {
		return JSON.stringify(e, null, 2);
	} catch {
		return JSON.stringify({ error: t });
	}
}, o = { buildFallbackText: a }, s = ({ value: e, className: t }) => {
	let { t: i } = r("ui", { useSuspense: !1 });
	return /* @__PURE__ */ n("pre", {
		className: t ?? "_13lprza0 txvbqbl77 txvbqbuy7",
		children: a(e, i("backoffice.jsonViewer.serializationError"))
	});
}, c = (t) => /* @__PURE__ */ n(e, {
	fallback: /* @__PURE__ */ n(s, {
		value: t.value,
		className: t.className
	}),
	children: /* @__PURE__ */ n(i, { ...t })
});
//#endregion
export { c as LazyBackofficeJsonViewer, c as default, o as __testLazyBackofficeJsonViewer };

//# sourceMappingURL=LazyBackofficeJsonViewer.js.map