<div class="tab combat sheet-part {{#if @root.tabs.combat.active}}active{{/if}}" data-group="sheet" data-tab="combat">
  {{> "systems/vermine2047/templates/actor/parts/actor-equipped-gear.hbs"}}

  <div class="grid grid-2col">
    {{!-- Computed Values --}}
    <div>
      <h4 class="align-center">{{ localize 'VERMINE.computed_values' }}</h4>
      <div class="stats-grid">
        <div class="stat">
          <label>{{ localize 'VERMINE.total_attack' }}:</label>
          <span>{{ system.computed.attack }}</span>
        </div>
        <div class="stat">
          <label>{{ localize 'ADVERSITY.damage' }}:</label>
          <span>{{ system.computed.damage }}</span>
        </div>
        <div class="stat">
          <label>{{ localize 'ADVERSITY.vigor' }}:</label>
          <span>{{ system.computed.vigor }}</span>
        </div>
        <div class="stat">
          <label>{{ localize 'ADVERSITY.reaction' }}:</label>
          <span>{{ system.computed.reaction }}</span>
        </div>
        <div class="stat">
          <label>{{ localize 'ADVERSITY.pools' }}:</label>
          <span>{{ system.computed.pools }}</span>
        </div>
        <div class="stat">
          <label>{{ localize 'ADVERSITY.protection' }}:</label>
          <span>{{ system.computed.protection }}</span>
        </div>
      </div>
    </div>

    {{!-- Wounds --}}
    <div>
      <h4 class="item-name effect-name flexrow">{{ localize "VERMINE.wounds.name" }}</h4>
      <ul class="unstyled">
        <li class="row mdb">
          {{ localize 'VERMINE.wounds.light' }} ({{ system.minorWound.threshold }}D)
          <div class="flexrow align-center">
            {{#repeat system.minorWound.max 1 "minorwoundmax"}}
            <div class="hexa ability{{#iflteq @minorwoundmax @root.system.minorWound.value }} checked{{/iflteq}}">
              <input type="radio" data-dtype="Number" name="system.minorWound.value"
                value="{{@minorwoundmax}}" data-action="clickWound" data-wound="minorWound"
                class="{{#iflteq @minorwoundmax @root.system.minorWound.value }}checked{{/iflteq}}"
                {{#ife @minorwoundmax @root.system.minorWound.value }}checked="checked"{{/ife}}
              />
            </div>
            {{/repeat}}
          </div>
        </li>
        <li class="row mdb">
          {{ localize 'VERMINE.wounds.heavy' }} ({{ system.majorWound.threshold }}D)
          <div class="flexrow align-center">
            {{#repeat system.majorWound.max 1 "majorwoundmax"}}
            <div class="hexa ability{{#iflteq @majorwoundmax @root.system.majorWound.value }} checked{{/iflteq}}">
              <input type="radio" name="system.majorWound.value" value="{{@majorwoundmax}}" data-action="clickWound" data-wound="majorWound"
                class="{{#iflteq @majorwoundmax @root.system.majorWound.value }}checked{{/iflteq}}"
                {{#ife @majorwoundmax @root.system.majorWound.value }}checked="checked"{{/ife}}
              />
            </div>
            {{/repeat}}
          </div>
        </li>
        <li class="row mdb">
          {{ localize 'VERMINE.wounds.deadly' }} ({{ system.deadlyWound.threshold }}D)
          <div class="flexrow align-center">
            {{#repeat system.deadlyWound.max 1 "deadlywoundmax"}}
            <div class="hexa ability{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }} checked{{/iflteq}}">
              <input type="radio" name="system.deadlyWound.value" value="{{@deadlywoundmax}}" data-action="clickWound" data-wound="deadlyWound"
                class="{{#iflteq @deadlywoundmax @root.system.deadlyWound.value }}checked{{/iflteq}}"
                {{#ife @deadlywoundmax @root.system.deadlyWound.value }}checked="checked"{{/ife}}
              />
            </div>
            {{/repeat}}
          </div>
        </li>
      </ul>
    </div>
  </div>

  {{!-- Armes --}}
  <div class="grid-span-2 weapons">
    <h4 class="item-name flexrow">{{ localize 'ITEMS.weapons' }}</h4>
    {{> "systems/vermine2047/templates/actor/parts/actor-weapons.hbs"}}
  </div>

  {{!-- Equipment --}}
  <div class="grid-span-2">
    <h4>{{ localize 'VERMINE.gear' }}</h4>
    {{editor system.equipment.description target="system.equipment.description" button=true owner=owner editable=editable}}
  </div>
</div>
