<form class="{{cssClass}}" autocomplete="off">

  {{!-- Sheet Header --}}
  <header class="sheet-header">
    <div class="header-fields">
      <div class="flexrow">
        <img class="profile-img margin-image-right" src="{{img}}" data-edit="img" title="{{name}}" />
        <div class="flexcol">
          <h1 class="charname "><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
          
          <div class="flexrow">
            <ul class="item-list alternate-list">
              <li class="item flexrow">
                <label class="item-field-label-medium">Alternate IDs</label>
                <input type="text" class="item-field-label-long4" name="system.biodata.alternateids" value="{{system.biodata.origin}}"
                  data-dtype="String" />
              </li>
            </ul>
          </div>
          
          <div class="grid grid-2col">
            <div>
            <ul class="item-list alternate-list">
              <li class="flexrow item">
                <label class="item-field-label-medium">Campaign</label>
                <input type="text" class="item-field-label-long3" name="system.biodata.campaign" value="{{system.biodata.campaign}}" data-dtype="String" />
              </li>
              <li class="flexrow item">
                <label class="item-field-label-medium">Player</label>
                <input type="text" class="item-field-label-long3" name="system.biodata.player" value="{{system.biodata.player}}"
                  data-dtype="String" />
              </li>
              <li class="flexrow item">
                <label class="item-field-label-medium">GM</label>
                <input type="text" class="item-field-label-long3" name="system.biodata.gm" value="{{system.biodata.gm}}"
                  data-dtype="String" />
              </li>
              <li class="item flexrow">
                <label class="item-field-label-medium">Hair</label>
                <input type="text" class="item-field-label-long3" name="system.biodata.hair" value="{{system.biodata.hair}}" data-dtype="String" />
              </li>
            </ul>
          </div>
          <div>
          <ul class="item-list alternate-list">
            <li class="flexrow item">
              <label class="item-field-label-medium">Gender</label>
              <input type="text" class="item-field-label-medium" name="system.biodata.gender" value="{{system.biodata.gender}}" data-dtype="String" />
            </li>
            <li class="item flexrow">
              <label class="item-field-label-medium">Height</label>
              <input type="text" class="item-field-label-medium" name="system.biodata.height" value="{{system.biodata.height}}" data-dtype="String" />
            </li>
            <li class="item flexrow">
              <label class="item-field-label-medium">Mass</label>
              <input type="text" class="item-field-label-medium" name="system.biodata.mass" value="{{system.biodata.mass}}" data-dtype="String" />
            </li>
            <li class="item flexrow">
              <label class="item-field-label-medium">Eyes</label>
              <input type="text" class="item-field-label-medium" name="system.biodata.eyes" value="{{system.biodata.eyes}}" data-dtype="String" />
            </li>
          </ul>
        </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </header>

  {{!-- Sheet Tab Navigation --}}
  <nav class="sheet-tabs tabs" data-group="primary">
    <a class="" data-tab="combat">Combat</a>
    <a class="" data-tab="biodata">Background</a>
    <a class="" data-tab="char">Characteristics</a>
    <a class="" data-tab="skills">Skills</a>
    <a class="" data-tab="perks">Perks</a>
    <a class="" data-tab="talents">Talents</a>
    <a class="" data-tab="martial">Martial Arts</a>
    <a class="" data-tab="powers">Powers</a>
    <a class="" data-tab="complications">Complications</a>
    <a class="" data-tab="equipment">Equipment</a>
    <a class="" data-tab="notes">Notes</a>
  </nav>

  {{!-- Sheet Body --}}
  <section class="sheet-body">


    {{!-- Combat Tab --}}
    <div class="tab combat" data-group="primary" data-tab="combat">
      <div class="flexcol">

        <div>
          <ul class="stat-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header-long">
                <h3><label class="items-title-text">Weapons</label></h3>
              </span>
              <span class="item-field-label-short">
                <label class="short-label">Ability</label>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Range</label>
              </span>
            </li>
            {{#each equippedWeapons as |weapon key|}}
            <li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
              <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
                  src="{{weapon.img}}" /></a>
              <span class="item-name-label-long"><a class ="roll-weapon">{{weapon.name}}</a></span>

              <span class="item-field-label-short">{{weapon.system.ability}}</span>

              <span class="item-field-label-medium">{{perk.system.range}}</span>

              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

        <div>
          <ul class="stat-list alternate-list">
            <li class="item flexrow list-item items-title-bg">
              <span class="item-name-label-header-long">
                <h3><label class="items-title-text">Feats</label></h3>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">Feature Die?</label>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">SL?</label>
              </span>
              <span class="item-field-label-medium">
                <label class="short-label">SL</label>
              </span>
            </li>
            {{#each feats as |feat key|}}
            <li class="item flexrow list-item list-item-shadow" data-item-id="{{feat._id}}">
              <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
                  src="{{feat.img}}" /></a>
              <span class="item-name-label-long">{{feat.name}}</span>

              <span class="item-field-label-medium">{{upperFirst feat.system.isfeatdie}}</span>
              <span class="item-field-label-medium">{{upperFirst feat.system.issl}}</span>
              <span class="item-field-label-medium">{{feat.system.sl}}</span>

              <div class="item-filler">&nbsp;</div>
              <div class="item-controls item-controls-fixed">
                <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
              </div>
            </li>
            {{/each}}
          </ul>
        </div>

      </div>
    </div>

    {{!-- Char Tab --}}
    <div class="tab char" data-group="primary" data-tab="char">

      <div class="charac-item">
        <ul>
          <li class="item flexrow list-item items-title-bg">
          <span class="item-field-label-short">
            <h3><label class="item-field-label-short">Value</label></h3>
          </span>
          <span class="item-field-label-medium">
            <label class="item-field-label-long">characteristic</label>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Base</label>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Roll</label>
          </span>
          <span class="item-field-label-long">
            <label class="short-label">Notes</label>
          </span>
          <div class="item-filler">&nbsp;</div>
        </li>

          {{#each characteristics as |charac key|}}
              {{> systems/fvtt-hero-system-6/templates/partials/partial-actor-full-charac.hbs charac=charac key=key}}
          {{/each}}
        </ul>            
      </div>

    </div>

    {{!-- Skills Tab --}}
    <div class="tab skills" data-group="primary" data-tab="skills">

      <ul class="stat-list alternate-list item-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-label-header">
            <h3><label class="items-title-text">Skills</label></h3>
          </span>
          <span class="item-field-label-long">
            <label class="short-label">CHAR</label>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Roll</label>
          </span>
          <div class="item-filler">&nbsp;</div>
        </li>
        {{#each skills as |skill key|}}
        <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{skill._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{skill.img}}" /></a>
          <span class="item-name-label">{{skill.name}}</span>
          <span class="item-field-label-short">{{upper skill.charac}}</span>
          <span class="item-field-label-short"><a class="roll-item" data-type="skill"><i class="fas fa-dice"></i>{{skill.roll}}-</a></span>
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>
    </div>

    {{!-- Perks Tab --}}
    <div class="tab perks" data-group="primary" data-tab="perks">

      <ul class="stat-list alternate-list item-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-label-header">
            <h3><label class="items-title-text">Perks</label></h3>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Roll</label>
          </span>
        </li>
        {{#each perks as |perk key|}}
        <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{perk._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{perk.img}}" /></a>
          <span class="item-name-label">{{perk.name}}</span>
          {{#if perk.system.hasroll}}          
          <span class="item-field-label-short"><a class="roll-item" data-type="perk"><i class="fas fa-dice"></i>{{perk.system.roll}}-</a></span>
          {{else}}
          <span class="item-field-label-short">&nbsp;</span>
          {{/if}}
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>
    </div>

    {{!-- Talents Tab --}}
    <div class="tab talents" data-group="primary" data-tab="talents">

      <ul class="stat-list alternate-list item-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-label-header">
            <h3><label class="items-title-text">Talents</label></h3>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Roll</label>
          </span>
        </li>
        {{#each talents as |talent key|}}
        <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{talent._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{talent.img}}" /></a>
          <span class="item-name-label">{{talent.name}}</span>
          {{#if talent.system.hasroll}}          
          <span class="item-field-label-short"><a class="roll-item" data-type="perk"><i class="fas fa-dice"></i>{{talent.system.roll}}-</a></span>
          {{else}}
          <span class="item-field-label-short">&nbsp;</span>
          {{/if}}
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>
    </div>

    {{!-- Martial Tab --}}
    <div class="tab martial" data-group="primary" data-tab="martial">

      <ul class="stat-list alternate-list item-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-label-header">
            <h3><label class="items-title-text">Martial Arts</label></h3>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Roll</label>
          </span>
        </li>
        {{#each martialarts as |martial key|}}
        <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{martial._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{martial.img}}" /></a>
          <span class="item-name-label"><a class="roll-item" data-type="talent">{{martial.name}}</a></span>
          {{#if martial.system.hasroll}}          
          <span class="item-field-label-short">{{martial.system.roll}}-</span>
          {{else}}
          <span class="item-field-label-short">&nbsp;</span>
          {{/if}}
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>
    </div>

    {{!-- Powers Tab --}}
    <div class="tab powers" data-group="primary" data-tab="powers">

      <ul class="stat-list alternate-list item-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-img sheet-competence-img">&nbsp;</span>
          <span class="item-field-label-short">
            <label class="item-field-label-short">Cost</label>
          </span>
          <span class="item-field-label-long4">
            <label class="item-field-label-long4">Power</label>
          </span>
          <span class="item-field-label-short">
            <label class="item-field-label-short">Roll</label>
          </span>
          <span class="item-field-label-medium">
            <label class="item-field-label-medium">END</label>
          </span>
        </li>
        {{#each powers as |power key|}}
        <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{power._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{power.img}}" /></a>
          <span class="item-field-label-short">{{power.system.cost}}</span>
          <span class="item-field-label-long4">{{{power.enrichDescription}}}
          </span>
          {{#if power.system.hasroll}}          
          <span class="item-field-label-short"><a class="roll-item" data-type="perk"><i class="fas fa-dice"></i>{{power.system.roll}}-</a></span>
          {{else}}
          <span class="item-field-label-short">&nbsp;</span>
          {{/if}}
          <span class="item-field-label-medium">{{power.system.endurance}}</span>
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>
    </div>

    {{!-- Complications Tab --}}
    <div class="tab complications" data-group="primary" data-tab="complications">

      <ul class="stat-list alternate-list item-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-label-header">
            <h3><label class="items-title-text">Complications</label></h3>
          </span>
          <span class="item-field-label-short">
            <label class="short-label">Roll</label>
          </span>
        </li>
        {{#each complications as |comp key|}}
        <li class="item stat flexrow list-item list-item-shadow" data-item-id="{{comp._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{comp.img}}" /></a>
          <span class="item-name-label">{{comp.name}}</span>
          {{#if comp.system.hasroll}}          
          <span class="item-field-label-short"><a class="roll-item" data-type="perk"><i class="fas fa-dice"></i>{{comp.system.roll}}-</a></span>
          {{else}}
          <span class="item-field-label-short">&nbsp;</span>
          {{/if}}
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>
    </div>

    {{!-- Equipement Tab --}}
    <div class="tab equipment" data-group="primary" data-tab="equipment">

      <div class="flexrow">
        <h3>Encumbrance</h3>
        <span class="small-label">Current : {{encCurrent}}</span>
        <span class="small-label">Capacity : {{encCapacity}}</span>
      </div>

      <ul class="item-list alternate-list">
        <li class="item flexrow list-item items-title-bg">
          <span class="item-name-label-header">
            <h3><label class="items-title-text">Money</label></h3>
          </span>
          <span class="item-field-label-long">
            <label class="short-label">Qty</label>
          </span>
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-add" data-type="currency" title="Create Item"><i class="fas fa-plus"></i></a>
          </div>
        </li>
        {{#each moneys as |money key|}}
        <li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
          <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
              src="{{money.img}}" /></a>
          <span class="item-name-label">{{money.name}}</span>

          <span class="item-field-label-long"><label>
              {{money.system.quantity}}
              (<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
            </label>
          </span>
          <div class="item-filler">&nbsp;</div>
          <div class="item-controls item-controls-fixed">
            <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
          </div>
        </li>
        {{/each}}
      </ul>

      {{> systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment-section.hbs title="Weapons" items=weapons}}

      {{> systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment-section.hbs title="Armor" items=armors}}

      {{> systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment-section.hbs title="Shields" items=shields}}

      {{> systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment-section.hbs title="Equipment" items=equipments}}

      <hr>

    </div>

    {{!-- Biography Tab --}}
    <div class="tab biodata" data-group="primary" data-tab="biodata">
      <div class="flexrow">
        <div class="biodata-portrait">
          <img src="{{img}}">
        </div>
        <div>
          <h3>Background/History : </h3>
          <div class="form-group editor">
            {{editor description target="system.biodata.description" button=true owner=owner
            editable=editable}}
          </div>
        </div>
      </div>
      <hr>
      <h3>Personality/Motivation : </h3>
      <div class="form-group editor">
        {{editor motivation target="system.biodata.motivation" button=true owner=owner
        editable=editable}}
      </div>
      <hr>
      <h3>Quote : </h3>
      <div class="form-group editor">
        {{editor quote target="system.biodata.quote" button=true owner=owner
        editable=editable}}
      </div>
      <h3>Powers/Tactics : </h3>
      <div class="form-group editor">
        {{editor tactics target="system.biodata.tactics" button=true owner=owner
        editable=editable}}
      </div>
      <h3>Campaign Use : </h3>
      <div class="form-group editor">
        {{editor campaignuse target="system.biodata.campaignuse" button=true owner=owner
        editable=editable}}
      </div>
      <h3>Appearance : </h3>
      <div class="form-group editor">
        {{editor appearance target="system.biodata.appearance" button=true owner=owner
        editable=editable}}
      </div>
    </div>

    {{!-- Notes Tab --}}
    <div class="tab notes" data-group="primary" data-tab="notes">
      <h3>Notes 1 : </h3>
      <div class="form-group editor">
        {{editor notes1 target="system.biodata.notes1" button=true owner=owner
        editable=editable}}
      </div>      
      <hr>
      <h3>Notes 2 : </h3>
      <div class="form-group editor">
        {{editor notes2 target="system.biodata.notes2" button=true owner=owner
        editable=editable}}
      </div>
      <hr>
      <h3>Notes 3 : </h3>
      <div class="form-group editor">
        {{editor notes3 target="system.biodata.notes3" button=true owner=owner
        editable=editable}}
      </div>
      <hr>
      <h3>Notes 4 : </h3>
      <div class="form-group editor">
        {{editor notes4 target="system.biodata.notes4" button=true owner=owner
        editable=editable}}
      </div>
      <hr>
      <h3>Notes 5 : </h3>
      <div class="form-group editor">
        {{editor notes5 target="system.biodata.notes5" button=true owner=owner
        editable=editable}}
      </div>

    </div>

  </div>

  </section>
</form>