<form class="{{cssClass}}" autocomplete="off">
  <header class="sheet-header">
      <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/>
      <div class="header-fields">
          <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1>
      </div>
  </header>
  {{> systems/fvtt-pegasus-rpg/templates/partial-item-nav.html}}

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

    {{> systems/fvtt-pegasus-rpg/templates/partial-item-description.html}}

    <div class="tab details" data-group="primary" data-tab="details">
      <ul>
          <li class="flexrow"><label class="generic-label">Location</label>
            <select class="competence-base flexrow" type="text" name="system.location" value="{{data.location}}" data-dtype="String">
              {{#select data.location}}
              <option value="front">Front</option>
              <option value="left">Left</option>
              <option value="rear">Rear</option>
              <option value="right">Right</option>
              <option value="top">Top</option>
              <option value="bottom">Bottom</option>
              {{/select}}
            </select> 
          </li>

          <li class="flexrow"><label class="generic-label">Weapon size</label>
            <input type="text" class="" name="system.size" value="{{data.size}}" data-dtype="Number"/>
          </li>

          <li class="flexrow"><label class="generic-label">Activated ?</label>
            <label class="attribute-value checkbox"><input type="checkbox" name="system.activated" {{checked data.activated}}/></label>
          </li>

          <li class="flexrow"><label class="generic-label">NRG</label>
            <input type="text" class="" name="system.nrg" value="{{data.nrg}}" data-dtype="Number"/>
          </li>

          {{> systems/fvtt-pegasus-rpg/templates/partial-equipment-effects.html}}

          <li class="flexrow"><label class="generic-label">Damage Dice Value</label>
            <select class="competence-base flexrow" type="text" name="system.damagedicevalue" value="{{data.damagedicevalue}}" data-dtype="String">
              {{#select data.damagedicevalue}}
              {{{optionsDiceList}}}
              {{/select}}
            </select>           
          </li>          
          <li class="flexrow"><label class="generic-label">Damage Type</label>
            <select class="competence-base flexrow" type="text" name="system.damagetype" value="{{data.damagetype}}" data-dtype="String">
              {{#select data.damagetype}} None, Cr, Pi, Sl, EMP, Kin, Therm, Pi&Therm, Pi&EMP, Pi&Kin, Cr&Therm, Cr&EMP, Cr&Kin
              <option value="none">None</option>
              <option value="cr">Cr</option>
              <option value="pi">Pi</option>
              <option value="sl">Sl</option>
              <option value="emp">EMP</option>
              <option value="kin">Kin</option>
              <option value="therm">Therm</option>
              <option value="pitherm">Pi&Therm</option>
              <option value="pikin">Pi&Kin</option>
              <option value="crtherm"> Cr&Therm</option>
              <option value="cremp"> Cr&EMP</option>
              <option value="crkin"> Cr&Kin</option>
              {{/select}}
            </select>                     
          </li>          

          <li class="flexrow"><label class="generic-label">Damage type level</label>
            <input type="text" class="" name="system.damagetypelevel" value="{{data.damagetypelevel}}" data-dtype="Number"/>
          </li>

          <li class="flexrow"><label class="generic-label">Extra damage ?</label>
            <label class="attribute-value checkbox"><input type="checkbox" name="system.extradamage" {{checked data.extradamage}}/></label>
          </li>

          {{#if data.extradamage}}
          <li class="flexrow"><label class="generic-label">Extra damage value (D12)</label>
            <input type="text" class="" name="system.extradamagevalue" value="{{data.extradamagevalue}}" data-dtype="Number"/>
          </li>
          {{/if}}

          <li class="flexrow"><label class="generic-label">Optimal Range</label>  
            <select class="competence-base flexrow" type="text" name="system.range" value="{{data.range}}" data-dtype="String">
              {{#select data.range}}
              {{> systems/fvtt-pegasus-rpg/templates/partial-options-range.html notapplicable=true}}
              {{/select}}
            </select>           
          </li>          

          <li class="flexrow"><label class="generic-label">AoE</label>
            <select class="competence-base flexrow" type="text" name="system.aoe" value="{{data.aoe}}" data-dtype="String">
              {{#select data.aoe}}
              <option value="none">None</option>
              <option value="tz">TZ</option>
              <option value="close">Close</option>
              <option value="medium">Medium</option>
              <option value="long">Long</option>
              <option value="extreme">Extreme</option>
              <option value="special">Special</option>
              {{/select}}
            </select> 
          </li>


          <li class="flexrow"><label class="generic-label">Turret</label>
            <select class="competence-base flexrow" type="text" name="system.turret" value="{{data.turret}}" data-dtype="String">
              {{#select data.turret}} 
              <option value="ffront">F Front</option>
              <option value="fleft">F Left</option>
              <option value="fright">F Right</option>
              <option value="frear">F Rear</option>
              <option value="fup">F Up</option>
              <option value="fdown">F Down</option>
              <option value="t180front">T 180 Front</option>
              <option value="t180left">T 180 Left</option>
              <option value="t180rear">T 180 Rear</option>
              <option value="t180right">T 180 Right</option>
              <option value="t360">T 360</option>
              {{/select}}
            </select>           
          </li>          

          <li class="flexrow"><label class="generic-label">Linked weapon ?</label>
            <label class="attribute-value checkbox"><input type="checkbox" name="system.linkedweapon" {{checked data.linkedweapon}}/></label>
          </li>
          
          <li class="flexrow"><label class="generic-label">IDR</label>
            <select class="competence-base flexrow" type="text" name="system.idr" value="{{data.idr}}" data-dtype="String">
              {{#select data.idr}}
              {{{optionsDiceList}}}
              {{/select}}
            </select> 
          </li>

          <li class="flexrow"><label class="generic-label">Space</label>
            <input type="text" class="" name="system.space" value="{{data.space}}" data-dtype="Number"/>
          </li>

          <li class="flexrow"><label class="generic-label">Cost</label>
            <input type="text" class="" name="system.cost" value="{{data.cost}}" data-dtype="Number"/>
          </li>

        </ul>
    </div>

  </section>
</form>
