<div class='autocomplete ac-user'>
  <ul>
    {{#each options.users as |user|}}
      <li>
        <a href title="{{user.name}}">
          {{avatar user imageSize="tiny"}}
          <span class='username'>{{format-username user.username}}</span>
          <span class='name'>{{user.name}}</span>
          {{decorate-username-selector user.username}}
        </a>
      </li>
    {{/each}}

    {{#if options.emails}}
      {{#each options.emails as |email|}}
        <li>
          <a href title="{{email.username}}">
            {{d-icon 'envelope'}}
            <span class='username'>{{format-username email.username}}</span>
          </a>
        </li>
      {{/each}}
    {{/if}}

    {{#if options.groups}}
      {{#each options.groups as |group|}}
        <li>
          <a href title="{{group.full_name}}">
            {{d-icon "users"}}
            <span class='username'>{{group.name}}</span>
            <span class='name'>{{group.full_name}}</span>
          </a>
        </li>
      {{/each}}
    {{/if}}
  </ul>
</div>
