<div class="sheet-box color-bg-archetype">
  <ul class="item-list alternate-list">
    <li class="item flexrow">
      {{#if isPNJ}}
      <span class="item-field-label-long roll-style">
        <a class="roll-root-competence item-field-label-short" data-action="rollRootCompetence" data-attr-key="{{keyProfil}}">
          <h3><label class="items-title-text">{{upperFirst keyProfil}}</label></h3>
        </a>
      </span>
      {{else}}
      <h3><label class="items-title-text">{{upperFirst keyProfil}} (Rang: {{skillDef.rang}})</label></h3>
      {{/if}}

      {{#if isPNJ}}
      <span class="item-field-label-short">
        <label class="short-label">Niveau</label>
      </span>
      <span class="item-field-label-short">
        <input type="text" data-dtype="Number" class="item-field-label-short"
          name="system.competences.{{keyProfil}}.niveau" value="{{skillDef.niveau}}" style="text-align: center;">
      </span>
      <div class="item-filler">&nbsp;</div>
      {{/if}}
    </li>
    {{#each skillDef.skills as |skill key|}}
    <li class="item flexrow " data-item-id="{{skill._id}}" data-item-type="competence">
      <span class="item-field-label-long roll-style"><a class="roll-competence item-field-label-short"
          data-action="rollCompetence" data-attr-key="tochoose">{{skill.name}}</a></span>
      <select class="item-field-label-short edit-item-data" type="text" data-item-field="niveau"
        value="{{skill.system.niveau}}" data-dtype="Number">
        {{selectOptions @root.config.listNiveau selected=skill.system.niveau}}
      </select>
      <input type="checkbox" class="item-field-label-short edit-item-data" data-tooltip="Prédilection" data-item-field="predilection" data-dtype="Boolean" {{checked
        skill.system.predilection}} />
      <div class="item-controls item-controls-fixed">
        <a class="item-control item-edit" title="Edit Item" data-action="editItem"><i class="fas fa-edit"></i></a>
        <a class="item-control item-delete" title="Delete Item" data-action="deleteItem"><i class="fas fa-trash"></i></a>
      </div>
    </li>
    {{#if (count skill.specList)}}
    <span class="specialisarion-margin specialisation-label item-field-label-long2">{{skill.specList}}</span>
    {{/if}}

    {{/each}}
  </ul>
</div>