<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-te-deum/templates/items/partial-item-nav.hbs}}


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

    {{> systems/fvtt-te-deum/templates/items/partial-item-description.hbs}}

    <div class="tab details" data-group="primary" data-tab="details">

      <div class="tab" data-group="primary">
        <ul>

          <li class="flexrow">
            <label class="item-name-label-long">Type d'arme</label>
            <select name="system.typeArme">
              {{selectOptions config.armeTypes selected=system.typeArme labelAttr="label"}}
            </select>
          </li>
          <li class="flexrow">
            <label class="item-name-label-long">Compétence</label>
            <select name="system.competence">
              {{selectOptions config.armeCompetences selected=system.competence labelAttr="label"}}
            </select>
          </li>
          <li class="flexrow">
            <label class="item-name-label-long">Compétence secondaire</label>
            <select name="system.competence2">
              {{selectOptions config.armeCompetences selected=system.competence2 blank="" labelAttr="label"}}
            </select>
          </li>

        <h3>Spécificités</h3>
          <li class="flexrow">
            <label class="item-name-label-long">Dégâts</label>
            <input type="text" class="padd-right numeric-input item-field-label-short"
              name="system.degats" value="{{system.degats}}" data-dtype="String" />
          </li>

          {{#if (eq system.typeArme "melee")}}
          <li class="flexrow">
            <label class="item-name-label-long">Allonge</label>
            <select name="system.allonge">
              {{selectOptions config.armeAllonges selected=system.allonge labelAttr="label"}}
            </select>
          </li>
          {{/if}}

          {{#each system.specificites as |spec specId|}}
          <li class="flexrow">
            {{#if (isSpecArmeType specId @root.system.typeArme)}}
            <label class="item-name-label-long">{{getConfigLabel "ARME_SPECIFICITE" specId}}</label>
            <input type="checkbox" name="system.specificites.{{specId}}.hasSpec" {{checked
              spec.hasSpec}} />
            {{/if}}
          </li>
          {{/each}}

          {{#if (eq system.typeArme "tir")}}
          <h3>Portées</h3>
          {{#each system.portees as |portee porteeId|}}
          <li class="flexrow">
            <label class="item-name-label-long">{{getConfigLabel "ARME_PORTEES" porteeId}}</label>
            <input type="text" class="padd-right numeric-input item-field-label-short"
              name="system.portees.{{porteeId}}.value" value="{{portee.value}}" data-dtype="Number" />
          </li>
          {{/each}}
          {{/if}}

          <h3>Degats sur armures</h3>
          {{#each system.degatsArmure as |degat degtId|}}
          <li class="flexrow">
            <label class="item-name-label-long">{{getConfigLabel "degatsArmure" degtId}}</label>
            <input type="text" class="padd-right numeric-input item-field-label-short"
              name="system.degatsArmure.{{degtId}}" value="{{degat}}" data-dtype="Number" />
          </li>
          {{/each}}

          <h3>Autres</h3>

          <li class="flexrow">
            <label class="item-name-label-long">Equipé?</label>
            <input type="checkbox" name="system.equipe" {{checked system.equipe}} />
          </li>

          <li class="flexrow">
            <label class="item-name-label-long">Bonus d'Initiative</label>
            <input type="text" class="padd-right numeric-input item-field-label-short"
              name="system.initiativeBonus" value="{{system.initiativeBonus}}" data-dtype="Number" />
          </li>

          <li class="flexrow">
            <label class="item-name-label-long">Prix</label>
            <input type="text" class="padd-right numeric-input item-field-label-short"
              name="system.prix" value="{{system.prix}}" data-dtype="Number" />
            <select name="system.monnaie">
              {{selectOptions config.monnaie selected=system.monnaie labelAttr="label" blank="denier"}}
            </select>
          </li>

        </ul>
      </div>
    </div>

  </section>
</form>