<section class="flexcol cde-sheet {{cssClass}}">
  <header class="cde-neon-header weapon">
    <img class="cde-avatar" src="{{item.img}}" data-action="editImage" data-edit="img" title="{{item.name}}" />
    <div class="cde-header-content">
      <h1 class="cde-item-name">
        <input name="name" type="text" value="{{item.name}}" placeholder="{{ localize 'CDE.Name' }}" />
      </h1>
    </div>
  </header>

  <nav class="sheet-tabs tabs cde-neon-tabs" data-group="primary">
    <a class="item" data-action="tab" data-group="primary" data-tab="details">{{ localize "CDE.Details" }}</a>
    <a class="item" data-action="tab" data-group="primary" data-tab="description">{{ localize "CDE.Description" }}</a>
    <a class="item" data-action="tab" data-group="primary" data-tab="notes">{{ localize "CDE.Notes" }}</a>
  </nav>

  <section class="sheet-body cde-tab-body">
    <div class="tab" data-group="primary" data-tab="details">
      <div class="cde-tab-label">{{ localize "CDE.Details" }}</div>
      <div class="cde-card">
        <div class="cde-stat-grid">
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.WeaponType" }}</span>
            <select name="system.weaponType">
              <option value="melee" {{#if (eq systemData.weaponType "melee")}}selected{{/if}}>{{ localize "CDE.WeaponMelee" }}</option>
              <option value="thrown" {{#if (eq systemData.weaponType "thrown")}}selected{{/if}}>{{ localize "CDE.WeaponThrown" }}</option>
              <option value="ranged" {{#if (eq systemData.weaponType "ranged")}}selected{{/if}}>{{ localize "CDE.WeaponRanged" }}</option>
              <option value="firearm" {{#if (eq systemData.weaponType "firearm")}}selected{{/if}}>{{ localize "CDE.WeaponFirearm" }}</option>
            </select>
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.Material" }}</span>
            <input type="text" name="system.material" value="{{systemData.material}}" placeholder="—" />
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.DamageBase" }}</span>
            <input type="number" name="system.damageBase" value="{{systemData.damageBase}}" />
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.Speciality" }}</span>
            <input type="checkbox" name="system.hasSpeciality" {{checked systemData.hasSpeciality}} />
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.DamageAspect" }}</span>
            <select name="system.damageAspect">
              <option value="metal" {{#if (eq systemData.damageAspect "metal")}}selected{{/if}}>{{ localize "CDE.Metal" }}</option>
              <option value="eau" {{#if (eq systemData.damageAspect "eau")}}selected{{/if}}>{{ localize "CDE.Water" }}</option>
              <option value="terre" {{#if (eq systemData.damageAspect "terre")}}selected{{/if}}>{{ localize "CDE.Earth" }}</option>
              <option value="feu" {{#if (eq systemData.damageAspect "feu")}}selected{{/if}}>{{ localize "CDE.Fire" }}</option>
              <option value="bois" {{#if (eq systemData.damageAspect "bois")}}selected{{/if}}>{{ localize "CDE.Wood" }}</option>
            </select>
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.Range" }}</span>
            <select name="system.range">
              <option value="contact" {{#if (eq systemData.range "contact")}}selected{{/if}}>{{ localize "CDE.RangeContact" }}</option>
              <option value="courte" {{#if (eq systemData.range "courte")}}selected{{/if}}>{{ localize "CDE.RangeCourte" }}</option>
              <option value="mediane" {{#if (eq systemData.range "mediane")}}selected{{/if}}>{{ localize "CDE.RangeMediane" }}</option>
              <option value="longue" {{#if (eq systemData.range "longue")}}selected{{/if}}>{{ localize "CDE.RangeLongue" }}</option>
              <option value="extreme" {{#if (eq systemData.range "extreme")}}selected{{/if}}>{{ localize "CDE.RangeExtreme" }}</option>
            </select>
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.ObtainLevel" }}</span>
            <input type="number" name="system.obtainLevel" value="{{systemData.obtainLevel}}" min="0" max="5" />
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.ObtainDifficulty" }}</span>
            <input type="number" name="system.obtainDifficulty" value="{{systemData.obtainDifficulty}}" min="0" max="3" />
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.Quantity" }}</span>
            <input type="number" name="system.quantity" value="{{systemData.quantity}}" />
          </div>
          <div class="cde-stat-cell">
            <span class="cde-stat-label">{{ localize "CDE.Reference" }}</span>
            <input type="text" name="system.reference" value="{{systemData.reference}}" placeholder="—" />
          </div>
        </div>
        <div style="margin-top:8px;">
          <span class="cde-badge weapon">{{ localize "CDE.Weapon" }}</span>
        </div>
      </div>
    </div>
    <div class="tab" data-group="primary" data-tab="description">
      <div class="cde-tab-label">{{ localize "CDE.Description" }}</div>
      <div class="cde-card cde-notes-editor">
        {{formInput systemFields.description enriched=descriptionHTML value=system.description name="system.description" toggled=true}}
      </div>
    </div>
    <div class="tab" data-group="primary" data-tab="notes">
      <div class="cde-tab-label">{{ localize "CDE.Notes" }}</div>
      <div class="cde-card cde-notes-editor">
        {{formInput systemFields.notes enriched=notesHTML value=system.notes name="system.notes" toggled=true}}
      </div>
    </div>
  </section>
</section>
