<form class="{{cssClass}}" npc-sheet autocomplete="off">
  <div class='gga-app {{classes}} npc-sheet'>
    <div class="npc-sheet-grid-container-ci">
      <div class="npc-input-top">
        <div class="npc-input-nm npc-input-label">{{localize "GURPS.sheet.personal.name"}}:</div>
        <div class="npc-input-nm-val npc-sheet-label">{{{gurpslink actor.name}}}</div>
        <div class="npc-input-title npc-input-label">{{localize "GURPS.sheet.personal.title"}}:</div>
        <div class="npc-input-title-val npc-sheet-label">{{{gurpslink system.traits.title}}}</div>
        <div class="npc-input-desc npc-input-label">Desc:</div>
        <div class="npc-input-desc-val npc-sheet-label">{{{gurpslink system.traits.appearance}}}</div>
      </div>
      <div class="npc-input-attr gurps">
        <div class="npc-input-st npc-input-labelr">{{localize "GURPS.attributesST"}}</div>
        <div class="npc-input-st-val rollable npc-sheet-centered" data-path="attributes.ST.value" data-otf='ST'>
          {{system.attributes.ST.value}}
        </div>
        <div class="npc-input-dx npc-input-labelr">{{localize "GURPS.attributesDX"}}</div>
        <div class="npc-input-dx-val rollable npc-sheet-centered" data-path="attributes.DX.value" data-otf='DX'>
          {{system.attributes.DX.value}}
        </div>
        <div class="npc-input-iq npc-input-labelr">{{localize "GURPS.attributesIQ"}}</div>
        <div class="npc-input-iq-val rollable npc-sheet-centered" data-path="attributes.IQ.value" data-otf='IQ'>
          {{system.attributes.IQ.value}}
        </div>
        <div class="npc-input-ht npc-input-labelr">{{localize "GURPS.attributesHT"}}</div>
        <div class="npc-input-ht-val rollable npc-sheet-centered" data-path="attributes.HT.value" data-otf='HT'>
          {{system.attributes.HT.value}}
        </div>
        <div class="npc-input-dmg npc-input-labelr">Dmg</div>
        <div class="npc-input-dmg-val rollable npc-sheet-centered" data-path="swing" data-damage
          data-otf='{{system.swing}} dmg'>{{system.swing}}</div>
        <div class=" npc-input-hp npc-input-labelr">{{localize "GURPS.HP"}}</div>
        <div class="npc-input-hp-val condition-block"><input class="npc-input-2 {{hpCondition system.HP "
						style"}}" name="system.HP.value" type="text" value="{{system.HP.value}}" data-dtype="Number" />
        </div>
        <div class="npc-input-will npc-input-labelr">{{localize "GURPS.attributesWILL"}}</div>
        <div class="npc-input-will-val rollable npc-sheet-centered" data-path="attributes.WILL.value" data-otf='WILL'>
          {{system.attributes.WILL.value}}
        </div>
        <div class="npc-input-per npc-input-labelr">{{localize "GURPS.attributesPER"}}</div>
        <div class="npc-input-per-val rollable npc-sheet-centered" data-path="attributes.PER.value" data-otf='PER'>
          {{system.attributes.PER.value}}
        </div>
        <div class="npc-input-fp npc-input-labelr">{{localize "GURPS.FP"}}</div>
        <div class="npc-input-fp-val condition-block"><input class="npc-input-2 {{fpCondition system.FP "
						style"}}" name="system.FP.value" type="text" value="{{system.FP.value}}" data-dtype="Number" />
        </div>
        <div class="npc-input-dodge npc-input-labelr">{{localize "GURPS.dodge"}}</div>
        <div class="npc-input-dodge-val rollable npc-sheet-centered" data-path="dodge" data-otf='Dodge'>
          {{system.currentdodge}}
        </div>
        <div class="npc-input-parry npc-input-labelr">{{localize "GURPS.parry"}}</div>
        <div class="npc-input-parry-val rollable npc-sheet-centered" data-path="parry" data-otf='Parry'>
          {{this.parryblock}}
        </div>
        <div class="npc-input-spd npc-input-labelr">{{localize "GURPS.speed"}}</div>
        <div class="npc-input-spd-val npc-sheet-centered">{{system.basicspeed.value}}</div>
        <div class="npc-input-mov npc-input-labelr">{{localize "GURPS.move"}}</div>
        <div class="npc-input-mov-val npc-sheet-centered">{{system.currentmove}}</div>
        <div class="npc-input-sm npc-input-labelr">SM</div>
        <div class="npc-input-sm-val npc-sheet-centered gmod" data-name="for Size Modifier"
          data-otf='{{system.traits.sizemod}} for Size Modifier'>{{{displayNumber system.traits.sizemod}}}
        </div>
        <div class="npc-input-dr npc-input-labelr">{{localize "GURPS.hitLocationDR"}}</div>
        <div class="npc-input-dr-val npc-sheet-centered">{{defense.dr}}{{#each defense.split as | this key
					|}}<span title='{{localize key}}'>/{{this}}{{#if (ne key 'cr')}}*{{/if}}</span>{{/each}}</div>
      </div>
      <div class="npc-input-notes">
        <div class='npc-sheet-ci'>
          {{#if useCI}}
            <div id='combat-hit' class='conditional-injury'>
              <div class='header major-heading'>{{localize "GURPS.addInjury"}}</div>
              <div class="tracked-resource no-border">
                <div class="header minor-heading">Severity</div>
                <div class='spinner'>
                  <button data-operation='ci-severity-dec'><i class="fas fa-minus"></i></button>

                  <input class="gcs-attr-input" name="system.conditionalinjury.injury.severity" type="text"
                    value="{{system.conditionalinjury.injury.severity}}" data-dtype="String"
                    data-operation="ci-severity-set" />

                  <button data-operation='ci-severity-inc'><i class="fas fa-plus"></i></button>
                  <button data-operation='ci-reset'><i class="fas fa-undo"></i></button>
                </div>
                <div class="header minor-heading">Time to Heal</div>
                <div class='spinner'>
                  <button data-operation='ci-days-dec'><i class="fas fa-minus"></i></button>
                  <input class="gcs-attr-input" name="injury.daystoheal" type="text"
                    value="{{system.conditionalinjury.injury.daystoheal}}" placeholder="" data-dtype="Number"
                    data-operation="ci-days-set" />
                  <button class='no-gap' data-operation='ci-days-inc'><i class="fas fa-plus"></i></button>
                  <div style='font-size: 85%;'>&nbsp;{{localize "GURPS.days"}}</div>
                </div>
                <div class='condition-block'>
                  <div class='tooltip-wrapper'>
                    <div
                      class='tooltip condition {{ciCurrentGrossEffects system.conditionalinjury.injury.severity "style"}}'>
                      {{ciCurrentGrossEffects system.conditionalinjury.injury.severity "label"}}
                      <span class="tooltiptext">
                        <div class="fieldblock">
                          {{#ciSeveritiesTooltip}}
                            <div class="field condensed noedit">{{severity}}</div>
                            <div class="label">{{label}}</div>
                          {{/ciSeveritiesTooltip}}
                        </div>
                      </span>
                    </div>
                  </div>
                  <div class='basic-value fieldblock3'>
                    <div class="points">[{{#if
										system.conditionalinjury.RT.points}}{{system.conditionalinjury.RT.points}}
                      {{else}}{{system.HP.points}}{{/if}}]
                    </div>
                    <div class='field'>{{system.conditionalinjury.RT.value}}&nbsp;{{localize "GURPS.rt"}}
                    </div>
                    <div class='label'>{{system.HP.max}}&nbsp;HP</div>
                  </div>
                </div>
              </div>
            </div>
          {{/if}}
        </div>
        <div class="npc-input-nt-val" style='--of:auto'>
          {{#listeqt system.notes}}
            <div class="desc indent0 dblclkedit" data-key="system.notes.{{@key}}">
              {{{gurpslinkbr this.notes}}}
            </div>
          {{/listeqt}}
        </div>
      </div>
      {{> portrait }}

      <div id='condition'>
        <div class="npc-header">{{localize "GURPS.conditions"}}</div>
        <div class="fieldblock">
          <div class="label">{{localize "GURPS.maneuver"}}</div>
          <div class="field">
            <select id='maneuver' name="system.conditions.maneuver">
              <option value='undefined' {{select-if ../system.conditions.maneuver undefined }}>
                {{localize "GURPS.none"}}
              </option>
              {{#each (listAllManeuvers) as | this key |}}
                <option value='{{key}}' {{select-if ../system.conditions.maneuver key }}>
                  {{localize this.label}}
                </option>
              {{/each}}
            </select>
          </div>
          <div class='label' for='move-mode'>{{localize 'GURPS.moveModeType'}}</div>
          <div class='field'>
            <select id='move-mode' {{disabled (or isEditing (lt (length system.move) 2)) }}>
              {{#each system.move as |this key|}}
                <option value='{{@key}}' {{select-if this.default true}}>{{localize this.mode}}
                </option>
              {{/each}}
            </select>
          </div>

        </div>
      </div>
      <div class="npc-input-traits">
        <div class="npc-input-tr dblclksort npc-header" data-key="system.ads">{{localize "GURPS.advDisadvPerkQuirks"}}
        </div>
        <div class="npc-input-tr-val">
          {{#listeqt system.ads}}
            <div class='npc-trait-row adsdraggable desc' data-key="system.ads.{{@key}}">
              <div>
                <div class="dblclkedit">{{{gurpslink this.name}}}
                  <div class="list_note">{{{gurpslinkbr this.notes}}}</div>
                </div>
              </div>
            </div>
          {{/listeqt}}
        </div>
      </div>
      <div class="npc-input-skills">
        <div class="npc-input-sk dblclksort npc-header" data-key="system.skills">{{localize "GURPS.skills"}}</div>
        <div class="npc-sheet-sk-val">
          {{#listeqt system.skills}}
            <div class='npc-trait-row skldraggable desc' data-key="system.skills.{{@key}}">
              <div>
                <div class="dblclkedit">{{{gurpslink this.name}}}
                  <div class="list_note">{{{gurpslinkbr this.notes @root}}}</div>
                </div>
              </div>
            </div>
            <div class="sl rollable npc-sheet-centered" data-name="{{this.name}}" data-key="system.skills.{{@key}}"
              data-otf='S:"{{this.name}}"'>{{this.level}}</div>
            <div></div>
          {{/listeqt}}
        </div>
      </div>
      <div class="npc-input-melee">
        <div class="npc-input-me desc npc-header">{{localize "GURPS.melee"}}</div>
        <div class="npc-sheet-me-val">
          {{#listattack data "melee"}}
            <div class='npc-trait-row meleedraggable desc' data-key='system.melee.{{@key}}'>
              <div>
                <div class='dblclkedit'>{{{gurpslink this.name}}} {{#if (truthy mode)}}({{mode}}){{/if}}
                  <div class="list_note">{{{gurpslink this.notes}}}</div>
                </div>
              </div>
            </div>
            <div class="level rollable" data-name="{{this.name}} ({{this.mode}})" data-key="system.melee.{{@key}}"
              data-otf='{{quotedAttackName 'M' this}}'>{{this.level}}</div>
            <div class="damage rollable" data-damage data-otf='{{this.damage}}'>{{this.damage}}</div>
          {{/listattack}}
        </div>
      </div>
      <div class="npc-input-ranged">
        <div class="npc-input-ra desc npc-header">{{localize "GURPS.ranged"}}</div>
        <div class="npc-sheet-ra-val">
          {{#listattack data "ranged"}}
            <div class='npc-trait-row rangeddraggable desc' data-key="system.ranged.{{@key}}">
              <div>
                <div class="dblclkedit">{{{gurpslink this.name}}} {{#if (truthy mode)}}({{mode}}){{/if}}
                  {{#if this.rof}} &bullet; (RoF:{{this.rof}}){{/if}}{{#if this.rcl}}
                    Rcl:{{this.rcl}}{{/if}}
                  <div class="list_note">{{{gurpslink this.notes}}}</div>
                </div>
              </div>
            </div>
            <div class="level rollable" data-name="{{this.name}} ({{this.mode}})" data-key="system.ranged.{{@key}}"
              data-otf='{{quotedAttackName 'R' this}}'>{{this.level}}</div>
            <div class="acc {{gmod this.acc}}" data-name='Acc for {{this.name}}'
              data-otf='{{{displayNumber this.acc}}} Acc'>
              {{{displayNumber this.acc showPlus=false}}}
            </div>
            <div class="damage rollable" data-damage data-otf='{{this.damage}}'>{{this.damage}}</div>
          {{/listattack}}
        </div>
      </div>

      <div class="npc-input-spells">
        <div class="npc-input-sp dblclksort npc-header" data-key="system.spells">{{localize "GURPS.pointsSpells"}}
        </div>
        <div class="npc-sheet-sp-val">
          {{#listeqt system.spells}}
            <div class="desc indent0 spldraggable dblclkedit" data-key="system.spells.{{@key}}">
              {{{gurpslink this.name}}}
              <div class="list_note spldraggable" data-key="system.spells.{{@key}}">{{{gurpslink this.notes
							@root}}}
              </div>
            </div>
            <div class="sl rollable npc-sheet-centered" data-name="{{this.name}}" data-otf='S:"{{this.name}}"'
              data-key="system.spells.{{@key}}">
              {{this.level}}
            </div>
            <div></div>
          {{/listeqt}}
        </div>
      </div>

      <div class="npc-input-equip">
        <div class="npc-input-eqt dblclksort npc-header">
          <div>{{localize "GURPS.equipment"}}</div>
          <div style="font-size: 80%; padding-right: 4px;"><i class="fas fa-weight-hanging"></i></div>
        </div>
        <div class="npc-sheet-eqt-val">
          {{#listeqt system.equipment.carried }}
            <div class="equipped">{{#if this.equipped}}
                <i class="fas fa-check-circle"></i>
              {{else}}
                <i class="far fa-circle gga-inactive"></i>
              {{/if}}
            </div>
            <div class="qty">{{this.count}}</div>
            <div class='npc-trait-row eqtdraggable desc' data-key="system.equipment.carried.{{@key}}">
              <div>
                <div class="dblclkedit">{{{gurpslink this.name}}}
                  <div class="list_note">{{{gurpslink this.notes}}}</div>
                </div>
              </div>
            </div>
            <div class="sum_cost">${{this.costsum}}</div>
            <div class="sum_weight">{{this.weightsum}}</div>
          {{/listeqt}}
        </div>
      </div>
    </div>
  </div>
</form>