<section class="character-subattributes tab" data-group="sheet" data-tab="subattributes">
  <div class="subattributes-content">
    <div class="subattributes-list">
      {{#each (entries config.SUB_ATTRIBUTES) as |entry|}}
        {{#with entry.[1] as |subAttr|}}
          <a class="rollable subattribute-item" data-roll-type="sub-attribute" data-roll-key="{{subAttr.id}}" title="{{#each subAttr.parents as |parentKey|}}{{uppercase parentKey}}{{#unless @last}}/{{/unless}}{{/each}}">
            <div class="subattribute-header">
              <i class="fa-duotone fa-solid fa-dice-d20"></i>
              <div class="subattribute-name">{{localize subAttr.label}}</div>
            </div>
            <div class="subattribute-value">
              {{#with (lookup ../../system.subAttributes subAttr.id) as |subAttrData|}}
                {{#if (gt subAttrData.value 0)}}
                  +{{subAttrData.value}}
                {{else}}
                  {{subAttrData.value}}
                {{/if}}
              {{/with}}
            </div>
          </a>
        {{/with}}
      {{/each}}
    </div>
  </div>
</section>
