<div
  class={{class-names
    componentName="EuiAvatar"
    size=(arg-or-default @size "m")
    type=(arg-or-default @type "user")
  }}
  aria-label={{@name}}
  title={{@name}}
  ...attributes
  {{simple-style
    (inline-styles
      componentName="EuiAvatar"
      componentArgs=(hash name=@name avatarColor=@avatarColor)
      background-image=(if @imageUrl @imageUrl "none")
    )
  }}
>
  {{#if (and @name (not @imageUrl))}}
    <span aria-hidden="true">
      {{to-initials @name @initialLength @initials}}
    </span>
  {{/if}}
</div>