import { jsx as _jsx } from "react/jsx-runtime";
import Icon from '../Icon';
import './Avatar.scss';
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 default Avatar;
//# sourceMappingURL=Avatar.js.map