import { jsx } from 'react/jsx-runtime';
import Icon from '../Icon/Icon.js';

const Avatar = ({ variant = "small", iconName, iconColor = 'var(--avatar-icon-color)', customAvatarSize, customIconSize, backgroundColor, label, labelFontSize, }) => {
    const truncatedLabel = label?.slice(0, 2);
    return (jsx("div", { className: `ff-avatar ff-avatar--${variant}`, style: { height: `${customAvatarSize}px`, width: `${customAvatarSize}px`, backgroundColor }, children: label ? (jsx("span", { className: "ff-avatar-label", style: { fontSize: labelFontSize || '14px', color: iconColor }, children: truncatedLabel })) : (jsx(Icon, { name: iconName, height: customIconSize, width: customIconSize, color: iconColor })) }));
};

export { Avatar as default };
//# sourceMappingURL=Avatar.js.map
