import { UdpTenantSelect } from "./UdpTenantSelect.mjs";
import { UdpDialog } from "../../UI/fluent-web-components/UdpDialog.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
//#region src/utilities/tenant/TenantAccessDialog.tsx
const TenantAccessDialog = (t0) => {
	const $ = c(9);
	const { tenants, onTenantChange, productName, open } = t0;
	const message = productName ? `Your current tenant does not have access to ${productName}. Please select another tenant to continue.` : "Your current tenant does not have access to this application. Please select another tenant to continue.";
	let t1;
	if ($[0] !== message) {
		t1 = /* @__PURE__ */ React.createElement("p", null, message);
		$[0] = message;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== onTenantChange || $[3] !== tenants) {
		t2 = /* @__PURE__ */ React.createElement(UdpTenantSelect, {
			tenants,
			onTenantChange,
			label: "Available Tenants"
		});
		$[2] = onTenantChange;
		$[3] = tenants;
		$[4] = t2;
	} else t2 = $[4];
	let t3;
	if ($[5] !== open || $[6] !== t1 || $[7] !== t2) {
		t3 = /* @__PURE__ */ React.createElement(UdpDialog, {
			open,
			type: "alert",
			dialogTitle: "Tenant Access Required",
			showHeaderCloseButton: false
		}, t1, t2);
		$[5] = open;
		$[6] = t1;
		$[7] = t2;
		$[8] = t3;
	} else t3 = $[8];
	return t3;
};
//#endregion
export { TenantAccessDialog };

//# sourceMappingURL=TenantAccessDialog.mjs.map