<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
  <div class="main-div">

    <fieldset>
      <legend>{{localize "HAMALRON.Label.characteristics"}}</legend>
      <div class="counters">
        <div class="flexcol">
          <div>
            <label>Trauma </label>{{formInput systemFields.trauma.fields.current value=system.trauma.current}} /
            {{formInput systemFields.trauma.fields.max value=system.trauma.max}}

            <label class="spaced-left"> Darkness </label>{{formInput systemFields.darkness.fields.current value=system.darkness.current}} /
            {{formInput systemFields.darkness.fields.max value=system.darkness.max}}
            {{formInput systemFields.darkness.fields.value value=system.darkness.value}}
            <label class="spaced-left"> Defense </label>{{formInput systemFields.defense.fields.base value=system.defense.base}}
            {{formInput systemFields.defense.fields.bonus value=system.defense.bonus }}
            {{formInput systemFields.defense.fields.total value=system.defense.total}}
            {{formInput systemFields.defense.fields.resistance value=system.defense.resistance}}
            <label class="spaced-left"> Movement </label>{{formInput systemFields.movement.fields.base value=system.movement.base}}
            {{formInput systemFields.movement.fields.reduce value=system.defense.reduce }}
          </div>

          <div class="flexrow characteristics-label">
            <label>&nbsp;</label><span>Curr.</span><span>Max</span>
            <label>&nbsp;</label><span>Curr.</span><span>Max</span><span>Mal.DR</span>
            <label>&nbsp;</label><span>Base</span><span>Armor</span><span>Total</span><span>Resi.</span>
            <label>&nbsp;</label><span>Base</span><span>Redu.</span>

          </div>
        </div>
      </div>
    </fieldset>

    <fieldset>
      <legend>{{localize "HAMALRON.Label.perks"}}{{#if isEditMode}}
        <a class="action" data-tooltip="{{localize "HAMALRON.Tooltip.addPerk"}}" data-tooltip-direction="UP"><i
            class="fas fa-plus" data-action="createPerk"></i></a>{{/if}}
      </legend>
      <div class="perks">
        {{#each perks as |item|}}
        <div class="perk item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">

          <img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
          <!-- <img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />-->
          <div class="name" data-roll-type="perk" data-action="toChat" data-item-uuid="{{item.uuid}}" data-tooltip="{{{item.system.description}}}">
            <a>{{item.name}}</a>
          </div>
          <span class="flavor" data-tooltip="Flavor text">{{upperFirst item.system.flavorText}}</span>
          <span class="role" data-tooltip="Role">{{upperFirst item.system.role}}</span>
          <span class="level" data-tooltip="Level">{{getRomanLevel item.system.level}}</span>

          <div class="controls">
            <a data-tooltip="{{localize 'HAMALRON.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
              data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
            <a data-tooltip="{{localize 'HAMALRON.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
              data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
          </div>
        </div>
        {{/each}}
      </div>
    </fieldset>

    <fieldset>
      <legend>{{localize "HAMALRON.Label.ailments"}}</legend>
      <div class="mortality">
        <label>Mortality :</label>
          {{#each system.mortality.enabled as |mortality idx|}}
            <input class="mortality-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
              data-name="enabled" {{#if mortality}} checked {{/if}}>
          {{/each}}
      </div>

      <div class="ailments">
        {{#each system.ailments as |item id|}}
        <div class="ailment " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="false">
          <label>{{item.label}}</label> <input type="checkbox" class="checkbox" name="system.ailments.{{id}}.enabled"
            {{#if item.enabled}} checked {{/if}}>
        </div>
        {{/each}}
      </div>
    </fieldset>

  </div>
</section>