<div class="chat-message-info">
  {{#if @message.chat_webhook_event}}
    {{#if @message.chat_webhook_event.username}}
      <span class="chat-message-info__username {{this.usernameClasses}}">
        {{@message.chat_webhook_event.username}}
      </span>
    {{/if}}

    <span class="chat-message-info__bot-indicator">
      {{i18n "chat.bot"}}
    </span>
  {{else}}
    <span
      role="button"
      class="chat-message-info__username {{this.usernameClasses}} clickable"
      data-user-card={{@message.user.username}}
    >
      <span class="chat-message-info__username__name">{{this.name}}</span>
      {{#if this.showStatus}}
        <div class="chat-message-info__status">
          <UserStatusMessage @status={{@message.user.status}} />
        </div>
      {{/if}}
    </span>
  {{/if}}

  <span class="chat-message-info__date">
    {{format-chat-date @message @details}}
  </span>

  {{#if @message.bookmark}}
    <span class="chat-message-info__bookmark">
      <BookmarkIcon @bookmark={{@message.bookmark}} />
    </span>
  {{/if}}

  {{#if this.isFlagged}}
    <span class="chat-message-info__flag">
      {{#if @message.reviewable_id}}
        <LinkTo @route="review.show" @model={{@message.reviewable_id}}>
          {{d-icon "flag" title="chat.flagged"}}
        </LinkTo>
      {{else}}
        {{d-icon "flag" title="chat.you_flagged"}}
      {{/if}}
    </span>
  {{/if}}
</div>