{{#if category}}
  <a href="#" {{action "expand"}} class="badge-category" {{bind-attr style="badgeStyle"}}>
    {{#if category.read_restricted}}
      <i class='fa fa-group'></i>
    {{/if}}
    {{category.name}}
  </a>
{{else}}
  {{#if noSubcategories}}
    <a href='#' {{action "expand"}} class='badge-category home' {{bind-attr style="badgeStyle"}}>{{i18n categories.no_subcategory}}</a>
  {{else}}
    <a href='#' {{action "expand"}} class='badge-category home' {{bind-attr style="badgeStyle"}}>{{allCategoriesLabel}}</a>
  {{/if}}
{{/if}}

{{#if categories}}
  <a href='#' {{action "expand"}} {{bind-attr class="dropdownButtonClass" style="badgeStyle"}}><i {{bind-attr class="iconClass"}}></i></a>
  <section {{bind-attr class="expanded::hidden :category-dropdown-menu"}} class='chooser'>
    <div class='cat'><a {{bind-attr href=allCategoriesUrl}} data-drop-close="true" class='badge-category home'>{{allCategoriesLabel}}</a></div>
    {{#if subCategory}}
    <div class='cat'><a {{bind-attr href=noCategoriesUrl}} data-drop-close="true" class='badge-category home'>{{i18n categories.no_subcategory}}</a></div>
    {{/if}}
    {{#each categories}}<div class='cat'>{{category-link this allowUncategorized=true}}</div>{{/each}}
  </section>
{{/if}}
