import { getSignInAuthProvider } from "./signInAuthProvider.mjs";
import { UdpButton } from "../../UI/fluent-web-components/UdpButton.mjs";
import { UdpDialog } from "../../UI/fluent-web-components/UdpDialog.mjs";
import { UdpText } from "../../UI/fluent-web-components/UdpText.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
//#region src/utilities/auth/UserErrorModal.jsx
/**
* Error modal shown when fetching the authed user fails. Extracted into its
* own module so the stencil-based UdpDialog/UdpText/UdpButton — which pull in
* the full stencil web-component graph (~574 KB udp-fluent-icon, etc.) — only
* load when this rare error path renders, not on every initial app load.
*/
const UserErrorModal = (t0) => {
	const $ = c(5);
	const { errorMessage } = t0;
	const t1 = errorMessage ? errorMessage : "An unexpected error has ocurred.";
	let t2;
	if ($[0] !== t1) {
		t2 = /* @__PURE__ */ React.createElement(UdpText, { variant: "subtitle2" }, t1);
		$[0] = t1;
		$[1] = t2;
	} else t2 = $[1];
	let t3;
	if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = /* @__PURE__ */ React.createElement(UdpButton, {
			slot: "action",
			appearance: "primary",
			onClick: _temp
		}, "Logout");
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] !== t2) {
		t4 = /* @__PURE__ */ React.createElement(UdpDialog, {
			open: true,
			showHeaderCloseButton: false
		}, t2, t3);
		$[3] = t2;
		$[4] = t4;
	} else t4 = $[4];
	return t4;
};
function _temp() {
	getSignInAuthProvider().logoutRedirect();
}
//#endregion
export { UserErrorModal as default };

//# sourceMappingURL=UserErrorModal.mjs.map