"use client";
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
const require_styles_styler = require('../../../styles/styler.cjs');
const require_components_Box = require('../../Box.cjs');
const require_components_IconSlot = require('../../IconSlot.cjs');
const require_components_client_Avatar_utils = require('./utils.cjs');
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
let _yahoo_uds_icons = require("@yahoo/uds-icons");

//#region src/components/client/Avatar/AvatarIcon.tsx
/** Maps avatar variant to icon */
const mapVariantToIcon = {
	primary: _yahoo_uds_icons.Person,
	secondary: _yahoo_uds_icons.Building
};
/**
* **AvatarIcon Component**
*
* Renders an Avatar with an icon representation.
*
* @param props - Props for icon variant.
* @returns The AvatarIcon element.
*/
const AvatarIcon = ({ size = require_components_client_Avatar_utils.DEFAULT_AVATAR_SIZE, variant = require_components_client_Avatar_utils.DEFAULT_AVATAR_VARIANT, customSize, icon, slotProps, className, ...props }) => {
	const classNames = (0, react.useMemo)(() => ({
		root: require_components_client_Avatar_utils.buildAvatarRootClasses(size, {
			avatarIconVariantRoot: variant,
			overflow: "hidden",
			className: require_styles_styler.cx("overflow-hidden", className)
		}),
		iconContainer: require_styles_styler.cx("w-full", "h-full", "shrink-0", "overflow-hidden", "text-center", "inline-flex", "justify-center", "items-center"),
		icon: require_styles_styler.getStyles({ avatarSizeIcon: size })
	}), [
		className,
		size,
		variant
	]);
	const inlineStyles = (0, react.useMemo)(() => require_components_client_Avatar_utils.buildInlineSizeStyles(customSize), [customSize]);
	const iconSvg = icon ?? mapVariantToIcon[variant ?? "primary"];
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
		className: classNames.root,
		style: inlineStyles.root,
		...props,
		children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Box.Box, {
			className: classNames.iconContainer,
			style: inlineStyles.contents,
			children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
				icon: iconSvg,
				iconProps: {
					variant: "fill",
					color: "current",
					...slotProps?.icon
				},
				className: classNames.icon
			})
		})
	});
};
AvatarIcon.displayName = "AvatarIcon";

//#endregion
exports.AvatarIcon = AvatarIcon;