<div class="c-topic-group">
  {{#if heading}}
  <h3 class="c-topic-group__heading">Related topics</h3>
  {{/if}}
  <div class="c-topic-group__body">
    <ul>
      {{#each items}}
      <li class="c-topic">
        {{!-- Article page --}}
        {{#ifCond ../articlePage "==" true}}
          {{> button
            buttonModifierClasses = "c-button--white-primary c-button--icon-only c-topic-icon"
            buttonIconId="#icon-follow"
            buttonAttributes="data-status=\"unfollowing\" type=\"button\" aria-label=\"Follow this topic\"" }}
          {{#ifCond this.author "==" true}}
            {{> button
              buttonModifierClasses = "c-button--white-primary c-button--small c-button--pillbox c-topic-name c-topic-author"
              buttonText = this.name
              anchorButton = true }}
            {{else}}
            {{> button
              buttonModifierClasses = "c-button--white-primary c-button--small c-button--pillbox c-topic-name"
              buttonText = this.name
              anchorButton = true }}
            {{/ifCond}}
        {{/ifCond}}
        {{!-- Topic and Author page --}}
        {{#ifCond ../topicPage "==" true}}
          {{> button
            buttonModifierClasses = "c-button--white-primary c-button--small c-button--pillbox c-topic-page"
            buttonText = this.name
            buttonIconId="#icon-follow"
            buttonAttributes="data-status=\"unfollowing\" type=\"button\" aria-label=\"Follow this topic\"" }}
        {{/ifCond}}
        {{!-- Following authors in article meta --}}
        {{#ifCond ../followingAuthor "==" true}}
          {{> button
            buttonModifierClasses = "c-button--white-primary c-button--small c-button--pillbox c-topic-page c-topic-author"
            buttonText = this.name
            buttonIconId="#icon-follow"
            buttonAttributes="data-status=\"unfollowing\" type=\"button\" aria-label=\"Follow this topic\"" }}
        {{/ifCond}}
      </li>
      {{/each}}
    </ul>
  </div>
</div>
