<div class="tab equipment sheet-part {{#if @root.tabs.equipment.active}}active{{/if}}" data-group="sheet" data-tab="equipment">
  <div class="weapons">
    <h4>{{localize 'ITEMS.weapons'}}</h4>
    {{> "systems/vermine2047/templates/actor/parts/actor-weapons.hbs"}}
  </div>
  <div class="protections">
    <h4>{{localize 'ITEMS.defenses'}}</h4>
    {{> "systems/vermine2047/templates/actor/parts/actor-defenses.hbs"}}
  </div>
  <div class="objects">
    <h4>{{localize 'ITEMS.items'}}</h4>
    <ol class="items-list">
      <li class="item flexrow items-header">
        <div
          class="item-name"
          style="flex:4;"
        >{{ localize
          'IDENTITY.name'}}</div>
        <div class="item-quantity">{{ localize 'VERMINE.qty'}}</div>
        <div class="item-weight">{{ localize 'VERMINE.weight'}}</div>
        <div class="item-controls">
          <a
            class="item-control item-create"
            title="Create item"
            data-action="create"
            data-type="item"
          ><i class="fas fa-plus"></i></a>
        </div>
      </li>
      {{#each gear as |item id|}}
        <li
          class="item flexrow flex-group-center"
          data-item-id="{{item._id}}"
        >
          <div
            class="item-name"
            style="flex:4;"
          >
            <div class="item-image">
              <a
                class="item-control item-edit"
                data-action="edit"
                data-item-id="{{item._id}}"
                data-roll-type="item"
              ><img
                  src="{{item.img}}"
                  title="{{item.name}}"
                  width="24"
                  height="24"
                /></a>
            </div>
            <a
              class="item-control item-edit"
              data-action="edit"
              data-item-id="{{item._id}}"
              data-tooltip="Edit Item"
            >{{item.name}} </a>

            {{#if item.system.damages.value}}
              /
              <span data-tooltip="{{item.damagedLabel}}">{{{item.damagedIcon}}}</span>
            {{/if}}

          </div>
          <div>
            <a class="item-control item-edit" data-action="edit" data-item-id="{{item._id}}" title="Edit Item">
              {{item.system.quantity}}
            </a>
          </div>
          <div>
            <a class="item-control item-edit" data-action="edit" data-item-id="{{item._id}}" title="Edit Item">
              {{item.system.weight}}
            </a>
          </div>
          <div class="item-controls">
            {{#if @root.isEditMode}}
            <a
              class="item-control item-delete"
              data-action="delete"
              data-item-id="{{item._id}}"
              title="Delete Item"
            ><i class="fas fa-trash"></i></a>
            {{/if}}
          </div>
        </li>
      {{/each}}
    </ol>
  </div>
  <div class="vehicles">
    <h4>{{localize 'ITEMS.vehicles'}}</h4>
    <ol class="items-list">
      <li class="item flexrow items-header">
        <div class="item-name" style="flex:4;">{{ localize 'IDENTITY.name'}}</div>
        <div class="item-mobility">{{ localize 'VERMINE.mobility'}}</div>
        <div class="item-rarity">{{ localize 'VERMINE.rarity'}}</div>
        <div class="item-reliability">{{ localize 'VERMINE.reliability'}}</div>
        <div class="item-controls">
          {{#if isEditMode}}
          <a class="item-control item-create" data-action="createVehicle" title="Create vehicle"><i class="fas fa-plus"></i></a>
          {{/if}}
        </div>
      </li>
      {{#each vehicles as |vehicle|}}
      <li class="item flexrow flex-group-center" data-vehicle-id="{{vehicle.id}}">
        <div class="item-name" style="flex:4;">
          <div class="item-image">
            <a class="item-control item-edit" data-action="editVehicle" data-vehicle-id="{{vehicle.id}}"><img
                src="{{vehicle.img}}" title="{{vehicle.name}}" width="24"
                height="24" /></a>
          </div>
          <a class="item-control item-edit" data-action="editVehicle" data-vehicle-id="{{vehicle.id}}" title="Edit Vehicle">{{vehicle.name}}</a>
        </div>
        <div><a class="item-control item-edit" data-action="editVehicle" data-vehicle-id="{{vehicle.id}}" title="Edit Vehicle">{{vehicle.system.mobility}}</a></div>
        <div><a class="item-control item-edit" data-action="editVehicle" data-vehicle-id="{{vehicle.id}}" title="Edit Vehicle">{{vehicle.system.rarity.value}}</a></div>
        <div><a class="item-control item-edit" data-action="editVehicle" data-vehicle-id="{{vehicle.id}}" title="Edit Vehicle">{{vehicle.system.reliability}}</a></div>
        <div class="item-controls">
          {{#if @root.isEditMode}}
          <a class="item-control item-delete" data-action="deleteVehicle" data-vehicle-id="{{vehicle.id}}" title="Delete Vehicle"><i
              class="fas fa-trash"></i></a>
          {{/if}}
        </div>
      </li>
      {{else}}
      <li class="item flexrow flex-group-center">
        <span class="empty">{{ localize 'VERMINE.no_vehicles' }}</span>
      </li>
      {{/each}}
    </ol>
  </div>
  <div class="equipment-notes">
    <h4>{{ localize 'IDENTITY.notes'}}</h4>
    {{formInput systemFields.equipment.fields.description enriched=enrichedEquipmentNotes value=system.equipment.description name="system.equipment.description" toggled=true}}
  </div>
</div>
