{{#if category}}
  <a href {{action "expand"}} class="badge-category" style={{badgeStyle}}>
    <span class="badge-category-bg" style={{categoryColor}}></span>
    {{#if category.read_restricted}}
      {{fa-icon "lock"}}
    {{/if}}
    {{category.name}}
  </a>
{{else}}
  {{#if noSubcategories}}
  <a href {{action "expand"}} class='badge-category home' style={{badgeStyle}}>{{i18n 'categories.no_subcategory'}}</a>
  {{else}}
  <a href {{action "expand"}} class='badge-category home' style={{badgeStyle}}>{{allCategoriesLabel}}</a>
  {{/if}}
{{/if}}

{{#if categories}}
  <a href {{action "expand"}} class={{dropdownButtonClass}} style={{badgeStyle}}><i class={{iconClass}}></i></a>
  <section {{bind-attr class="expanded::hidden :category-dropdown-menu :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}}
    {{#if renderCategories}}
      {{#each c in categories}}<div class='cat'>{{category-link c allowUncategorized=true hideParent=subCategory}}</div>{{/each}}
    {{/if}}
  </section>
{{/if}}
