<section data-tab="loot" data-group="{{tab.group}}" class="tab {{tab.cssClass}}">

  <fieldset>
    <legend>{{localize "OATHHAMMER.Label.Loot"}}</legend>

    {{#if lootItems.length}}
    <ul class="item-list item-list--party-loot">
      <li class="item-list-header">
        <span></span>
        <span class="col-name">{{localize "OATHHAMMER.Label.Name"}}</span>
        <span>{{localize "OATHHAMMER.Label.Type"}}</span>
        <span>{{localize "OATHHAMMER.Label.Qty"}}</span>
        <span></span>
      </li>
      {{#each lootItems as |item|}}
      <li class="item-entry" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
        <img src="{{item.img}}" class="item-img" />
        <span class="item-name">{{item.name}}</span>
        <span class="item-type">{{item.typeLabel}}</span>
        <div class="item-qty">
          <a data-action="adjustQty" data-item-id="{{item.id}}" data-delta="-1" class="qty-btn">−</a>
          <span>{{#if item.system.quantity}}{{item.system.quantity}}{{else}}1{{/if}}</span>
          <a data-action="adjustQty" data-item-id="{{item.id}}" data-delta="1" class="qty-btn">+</a>
        </div>
        <div class="item-actions">
          <a data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'OATHHAMMER.Label.Edit'}}"><i class="fa-solid fa-edit"></i></a>
          <a data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-tooltip="{{localize 'OATHHAMMER.Label.Delete'}}"><i class="fa-solid fa-trash"></i></a>
        </div>
      </li>
      {{/each}}
    </ul>
    {{else}}
    <p class="no-items">{{localize "OATHHAMMER.Label.NoLoot"}}</p>
    {{/if}}
  </fieldset>

  <p class="settlement-hint">{{localize "OATHHAMMER.Label.DropLootHint"}}</p>

</section>
