{{! the class linkable-item is needed for the read-more component }}
{{#if @isLink}}
{{#if this.fetchComplete}} {{#each this.displayArrayTruncated as |item|}} {{#if (is-wildcard-string item)}} {{#let (filter-wildcard item this.allOptions) as |wildcardCount|}} {{item}} {{if (not-eq wildcardCount undefined) (concat "includes " wildcardCount)}} {{if (eq wildcardCount 1) @wildcardLabel (pluralize @wildcardLabel)}} {{#if (eq this.displayArrayTruncated.lastObject item)}} View all {{lowercase @label}}. {{/if}} {{/let}} {{else}} {{#if (is-array this.itemRoute)}} {{or (get this.itemNameById item) item}} {{else}} {{or (get this.itemNameById item) item}} {{/if}} {{/if}} {{#if (not-eq item this.displayArrayTruncated.lastObject)}} ,  {{/if}} {{#unless this.doNotTruncate}} {{#if (and (eq item this.displayArrayTruncated.lastObject) (gte @displayArray.length 10))}} {{! dec is a math helper that decrements by 5 the length of the array ex: 11-5 = "and 6 others."}}  and {{dec 5 @displayArray.length}} others.  {{/if}} {{#if (and (eq item this.displayArrayTruncated.lastObject) (gte @displayArray.length 10))}} {{#if (is-array @rootRoute)}} View all {{lowercase @label}}. {{else}} View all {{lowercase @label}}. {{/if}} {{/if}} {{/unless}} {{/each}} {{/if}}
{{else}} {{if (gte @displayArray.length 10) (concat @displayArray ", and " (dec 5 @displayArray.length) " more.") @displayArray }} {{/if}}