import { clearStoredPath, getStoredPath } from "../redirect/LocalRedirectUrlStorage.mjs";
import { clearStoredExternalPath, getStoredExternalPath } from "../redirect/ExternalRedirectUrlStorage.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Redirect, Route } from "react-router-dom";
//#region src/utilities/auth/AadCallback.jsx
const AadCallback = () => {
	const $ = c(4);
	let t0;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = getStoredPath();
		$[0] = t0;
	} else t0 = $[0];
	const localUrl = t0;
	let t1;
	if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = getStoredExternalPath();
		$[1] = t1;
	} else t1 = $[1];
	const externalUrl = t1;
	clearStoredPath();
	clearStoredExternalPath();
	if (externalUrl) {
		let t2;
		if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
			t2 = /* @__PURE__ */ React.createElement(Route, { component: () => {
				window.location.href = externalUrl;
				return null;
			} });
			$[2] = t2;
		} else t2 = $[2];
		return t2;
	}
	let t2;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = /* @__PURE__ */ React.createElement(Redirect, { to: localUrl === "/aad_callback" ? "/" : localUrl });
		$[3] = t2;
	} else t2 = $[3];
	return t2;
};
//#endregion
export { AadCallback as default };

//# sourceMappingURL=AadCallback.mjs.map