<div class="tab advancements-tab content padding-7" data-group="primary" data-tab="advancements">
  <div class="sub-header">
    <span>{{localize "dc20rpg.item.sheet.advancements.title"}}</span>
    {{#unless @root.hasOwner}}
    <a class="create-advancement fa-lg fa-plus fa-solid" title="{{localize "dc20rpg.item.sheet.advancements.newAdv"}}"></a>
    {{else}}
    <span><i style="font-size: 9px; color: black; text-shadow: none;">{{localize "dc20rpg.item.sheet.advancements.nonEditable"}}</i></span>
    {{/unless}}
  </div>
  {{#each advByLevel as |level number|}}
  <div class="advancements-table">
    {{!-- Header --}}
    <div class="advancement-header">
      <div class="column name margin-left-10  ">{{localize "dc20rpg.item.sheet.advancements.name"}}</div>
      <div class="column">{{localize "dc20rpg.item.sheet.advancements.path"}}</div>
      <div class="column">{{localize "dc20rpg.item.sheet.advancements.choice"}}</div>
      <div class="column">{{localize "dc20rpg.item.sheet.advancements.level"}} {{number}}</div>
    </div>

    {{!-- Row --}}
    {{#each level as |advancement key|}}
    <div class="advancement-row {{#if advancement.additionalAdvancement}}additional-advancements{{/if}} {{#unless @root.hasOwner}}editable-advancement{{/unless}}" data-key="{{key}}">
      <div class="column name">    
        <span class="margin-left-10">{{advancement.name}}</span>
      </div>
      <div class="column">
        {{#if advancement.progressPath}}<i class="fa-lg fa-solid fa-square-check"></i>{{/if}}
      </div>
      <div class="column">
        {{#if advancement.mustChoose}}
        <i class="fa-lg fa-solid fa-square-check"></i>
        <span class="margin-left-3">({{advancement.pointAmount}})</span>
        {{/if}}
      </div>
      <div class="column config">
        {{#unless @root.hasOwner}}
        <a class="advancement-edit fas fa-edit margin-right-3" data-key="{{key}}" title="{{localize "dc20rpg.item.sheet.advancements.editAdv"}}"></a>
        <a class="advancement-delete fas fa-trash margin-left-3" data-key="{{key}}" title="{{localize "dc20rpg.item.sheet.advancements.removeAdv"}}"></a>
        {{/unless}}
      </div>
    </div>
    {{/each}}
  </div>
  {{/each}}
</div>