import { cx as e } from "../../../theme/tools.js";
import { ChevronDownSvg as t } from "../../../icons/ChevronDownSvg.js";
import { Dropdown as n } from "../../../atomic/molecules/dropdown/Dropdown.js";
import { ProfileDropdownLogoutSvg as r } from "../../../icons/ProfileDropdownLogoutSvg.js";
import { avatar as i, avatarTheme as a, container as o, hidden as s, menu as c, menuDisplayName as l, menuDisplayNameTheme as u, menuEmail as d, menuEmailTheme as f, menuIcon as p, menuIconTheme as m, menuIdentity as h, menuItem as g, title as _, titleTheme as v, trigger as y, triggerMain as b } from "./sidebarProfileMenu.css.js";
import { jsx as x, jsxs as S } from "react/jsx-runtime";
//#region src/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.tsx
var C = ({ viewer: C, collapsed: w, labels: T, onSignOut: E, isSigningOut: D = !1, className: O }) => {
	let k = e(_, v);
	w && (k = s);
	let A = `${T.menuAriaLabel}: ${C.displayName}`, j;
	return w && (j = A), /* @__PURE__ */ S("div", {
		className: e(o, O),
		children: [/* @__PURE__ */ x("div", {
			className: k,
			children: T.sectionTitle
		}), /* @__PURE__ */ x(n, {
			trigger: (n) => /* @__PURE__ */ S("button", {
				type: "button",
				className: y({ collapsed: w }),
				"aria-label": A,
				title: j,
				children: [/* @__PURE__ */ S("span", {
					className: b,
					children: [/* @__PURE__ */ x("span", {
						className: e(i, a),
						children: C.initials
					}), !w && /* @__PURE__ */ S("span", {
						className: "_1uw3f9od txvbqbfpn txvbqbh4x txvbqbv7x",
						children: [/* @__PURE__ */ x("span", {
							className: e("_1uw3f9oe txvbqb9j txvbqbhbf txvbqb1avz txvbqbwr6 txvbqb18ef", "_1uw3f9of"),
							children: C.displayName
						}), /* @__PURE__ */ x("span", {
							className: e("_1uw3f9og txvbqb96 txvbqb1avz txvbqbwr6 txvbqb18ef", "_1uw3f9oh"),
							children: C.email
						})]
					})]
				}), !w && /* @__PURE__ */ x(t, {
					width: 16,
					height: 16,
					className: e("_1uw3f9oi txvbqb7p txvbqb75 txvbqb7t", "_1uw3f9oj", { "_1uw3f9ok txvbqb30": n })
				})]
			}),
			ariaLabel: A,
			contentRole: "dialog",
			contentAriaLabel: A,
			placement: "top-start",
			closeOnItemClick: !0,
			matchTriggerWidth: !1,
			children: /* @__PURE__ */ S("div", {
				className: c,
				children: [/* @__PURE__ */ S("div", {
					className: h,
					children: [/* @__PURE__ */ x("span", {
						className: e(l, u),
						children: C.displayName
					}), /* @__PURE__ */ x("span", {
						className: e(d, f),
						children: C.email
					})]
				}), /* @__PURE__ */ S("button", {
					type: "button",
					className: g,
					onClick: E,
					disabled: D,
					children: [/* @__PURE__ */ x("span", {
						className: e(p, m),
						children: /* @__PURE__ */ x(r, {
							width: 16,
							height: 16
						})
					}), T.signOut]
				})]
			})
		})]
	});
};
//#endregion
export { C as BackofficeSidebarProfileMenu, C as default };

//# sourceMappingURL=BackofficeSidebarProfileMenu.js.map