import Box from "../box/box.js";
import Icon from "../icon/icon.js";
import T from "../t/t.js";
import Badge from "../badge/badge.js";
import { memo } from "react";
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";

//#region src/sidemenuV2/SidemenuItemContent.tsx
const SidemenuItemContent = memo(({ icon, iconSize = "sm", title, isMenuExpanded, isInPopover, badge, badgeLinkUrl }) => {
	const iconBaseMarginLeft = 13 / 8;
	const iconMarginRight = isMenuExpanded ? 10 / 8 : 20 / 8;
	if (isInPopover) return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(T, {
		isTruncated: true,
		size: "sm",
		display: "inline-block",
		fontWeight: "500",
		ml: iconBaseMarginLeft,
		children: title
	}), badge && typeof badge === "object" && typeof badge.text === "string" && badge.text.trim() !== "" && /* @__PURE__ */ jsx(Badge, {
		...badge,
		"data-link": btoa(badgeLinkUrl ?? "#"),
		variant: badge.variant ?? "subtleGreen",
		size: "sm",
		minW: "32px",
		fontSize: "12px",
		lineHeight: "16px",
		ml: "10px",
		mr: "10px"
	})] });
	return /* @__PURE__ */ jsxs(Fragment$1, { children: [
		/* @__PURE__ */ jsx(Box, {
			ml: iconBaseMarginLeft,
			mr: iconMarginRight,
			w: "20px",
			transition: "margin 0.2s ease-in-out",
			children: icon && /* @__PURE__ */ jsx(Icon, {
				name: icon,
				size: iconSize
			})
		}),
		/* @__PURE__ */ jsx(T, {
			isTruncated: true,
			size: "sm",
			display: "inline-block",
			children: title
		}),
		badge && typeof badge === "object" && typeof badge.text === "string" && badge.text.trim() !== "" && /* @__PURE__ */ jsx(Badge, {
			...badge,
			"data-link": btoa(badgeLinkUrl ?? "#"),
			variant: badge.variant ?? "subtleGreen",
			size: "sm",
			minW: "32px",
			fontSize: "12px",
			lineHeight: "16px",
			ml: "10px",
			mr: "10px"
		})
	] });
});
SidemenuItemContent.displayName = "SidemenuItemContent";

//#endregion
export { SidemenuItemContent as default };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=SidemenuItemContent.js.map