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, container as a, hidden as o, menu as s, menuDisplayName as c, menuEmail as l, menuIcon as u, menuIdentity as d, menuItem as f, title as p, trigger as m, triggerMain as h } from "./sidebarProfileMenu.css.js";
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
//#region src/backoffice/molecules/sidebar_profile_menu/BackofficeSidebarProfileMenu.tsx
var v = ({ viewer: v, collapsed: y, labels: b, onSignOut: x, isSigningOut: S = !1, className: C }) => {
	let w = p;
	y && (w = o);
	let T = `${b.menuAriaLabel}: ${v.displayName}`, E;
	return y && (E = T), /* @__PURE__ */ _("div", {
		className: e(a, C),
		children: [/* @__PURE__ */ g("div", {
			className: w,
			children: b.sectionTitle
		}), /* @__PURE__ */ g(n, {
			trigger: (n) => /* @__PURE__ */ _("button", {
				type: "button",
				className: m({ collapsed: y }),
				"aria-label": T,
				title: E,
				children: [/* @__PURE__ */ _("span", {
					className: h,
					children: [/* @__PURE__ */ g("span", {
						className: i,
						children: v.initials
					}), !y && /* @__PURE__ */ _("span", {
						className: "_1uw3f9ob txvbqb9ip txvbqbai7 txvbqbk5y",
						children: [/* @__PURE__ */ g("span", {
							className: "_1uw3f9oc txvbqb8y txvbqbamp txvbqbv9z txvbqbuxg txvbqbl7g txvbqbt7g",
							children: v.displayName
						}), /* @__PURE__ */ g("span", {
							className: "_1uw3f9od txvbqb8p txvbqbva1 txvbqbuxg txvbqbl7g txvbqbt7g",
							children: v.email
						})]
					})]
				}), !y && /* @__PURE__ */ g(t, {
					width: 16,
					height: 16,
					className: e("_1uw3f9oe txvbqbva1 txvbqb7g txvbqb6w txvbqb7k", { "_1uw3f9of txvbqb2w": n })
				})]
			}),
			ariaLabel: T,
			contentRole: "dialog",
			contentAriaLabel: T,
			placement: "top-start",
			closeOnItemClick: !0,
			matchTriggerWidth: !1,
			children: /* @__PURE__ */ _("div", {
				className: s,
				children: [/* @__PURE__ */ _("div", {
					className: d,
					children: [/* @__PURE__ */ g("span", {
						className: c,
						children: v.displayName
					}), /* @__PURE__ */ g("span", {
						className: l,
						children: v.email
					})]
				}), /* @__PURE__ */ _("button", {
					type: "button",
					className: f,
					onClick: x,
					disabled: S,
					children: [/* @__PURE__ */ g("span", {
						className: u,
						children: /* @__PURE__ */ g(r, {
							width: 16,
							height: 16
						})
					}), b.signOut]
				})]
			})
		})]
	});
};
//#endregion
export { v as BackofficeSidebarProfileMenu, v as default };

//# sourceMappingURL=BackofficeSidebarProfileMenu.js.map