/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../_virtual/_rolldown/runtime.cjs");
const require_styles_styler = require("../../../styles/styler.cjs");
const require_components_Text = require("../../Text.cjs");
const require_components_Box = require("../../Box.cjs");
const require_components_client_Avatar_utils = require("./utils.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/client/Avatar/AvatarText.tsx
/**
* **AvatarText Component**
*
* Renders an Avatar with text (initials) representation.
*
* @param props - Props for text variant.
* @returns The AvatarText element.
*/
const AvatarText = (0, react.forwardRef)(({ size = "md", variant = require_components_client_Avatar_utils.DEFAULT_AVATAR_VARIANT, name, initials, customSize, abbreviationStrategy, className, slotProps, ...props }, ref) => {
	const classNames = (0, react.useMemo)(() => ({
		root: require_components_client_Avatar_utils.buildAvatarRootClasses(size, {
			avatarTextVariantRoot: variant,
			className: require_styles_styler.cx("overflow-hidden", "truncate", className)
		}),
		text: require_styles_styler.cx("w-full", "h-full", "shrink-0", "overflow-hidden", "text-center", "inline-flex", "justify-center", "items-center", "truncate")
	}), [
		className,
		size,
		variant
	]);
	const inlineStyles = (0, react.useMemo)(() => require_components_client_Avatar_utils.buildInlineSizeStyles(customSize), [customSize]);
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
		ref,
		className: classNames.root,
		style: inlineStyles.root,
		...props,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
			color: "inherit",
			variant: "inherit",
			className: classNames.text,
			style: inlineStyles.contents,
			...slotProps?.text,
			children: initials || require_components_client_Avatar_utils.generateAvatarAbbreviation(name, abbreviationStrategy)
		})
	});
});
AvatarText.displayName = "AvatarText";
//#endregion
exports.AvatarText = AvatarText;
