<div class="cde-roll-prompt cde-weapon-prompt {{cssClass}}">

  {{!-- Weapon identity bar --}}
  <div class="cde-weapon-info-bar">
    <img class="cde-weapon-aspect-icon" src="{{weaponAspectIcon}}" alt="{{weaponAspectLabel}}" />
    <div class="cde-weapon-info-text">
      <span class="cde-weapon-info-name">{{weaponName}}</span>
      <span class="cde-weapon-info-meta">{{ localize weaponTypeLabel }} · {{ localize "CDE.DamageBase" }}: {{damageBase}}</span>
    </div>
    <div class="cde-weapon-info-badge">
      <i class="fas fa-dice-d10"></i>
    </div>
  </div>

  <div class="cde-roll-header">
    <span class="cde-roll-title">{{ localize "CDE.WeaponRollTitle" }}</span>
    <span class="cde-roll-dice-count">{{numberofdice}}<span class="cde-roll-dice-label">d10</span></span>
  </div>

  <div class="cde-roll-section">
    <div class="cde-roll-field">
      <label>{{ localize "CDE.Skill" }}</label>
      <select name="weaponskill">
        <option value="kungfu" {{#if (eq weaponskill "kungfu")}}selected{{/if}}>{{ localize "CDE.KungFu" }}</option>
        <option value="rangedcombat" {{#if (eq weaponskill "rangedcombat")}}selected{{/if}}>{{ localize "CDE.RangedCombat" }}</option>
      </select>
    </div>
    <div class="cde-roll-field">
      <label>{{ localize "CDE.Aspect" }}</label>
      <select name="aspect">
        <option value="0" {{#if (eq aspect 0)}}selected{{/if}}>{{ localize "CDE.Metal" }}</option>
        <option value="1" {{#if (eq aspect 1)}}selected{{/if}}>{{ localize "CDE.Water" }}</option>
        <option value="2" {{#if (eq aspect 2)}}selected{{/if}}>{{ localize "CDE.Earth" }}</option>
        <option value="3" {{#if (eq aspect 3)}}selected{{/if}}>{{ localize "CDE.Fire" }}</option>
        <option value="4" {{#if (eq aspect 4)}}selected{{/if}}>{{ localize "CDE.Wood" }}</option>
      </select>
    </div>
  </div>

  <div class="cde-roll-section">
    <div class="cde-roll-field">
      <label>{{ localize "CDE.EffectiveRange" }}</label>
      <select name="effectiverange">
        {{#each validRanges}}
        <option value="{{value}}" {{#if selected}}selected{{/if}}>{{ localize label }}</option>
        {{/each}}
      </select>
    </div>
    <div class="cde-roll-field">
      <label>{{ localize "CDE.BonusMalus" }}</label>
      <select name="bonusmalus">
        <option value="-5" {{#if (eq bonusmalus -5)}}selected{{/if}}>−5 dés</option>
        <option value="-4" {{#if (eq bonusmalus -4)}}selected{{/if}}>−4 dés</option>
        <option value="-3" {{#if (eq bonusmalus -3)}}selected{{/if}}>−3 dés</option>
        <option value="-2" {{#if (eq bonusmalus -2)}}selected{{/if}}>−2 dés</option>
        <option value="-1" {{#if (eq bonusmalus -1)}}selected{{/if}}>−1 dé</option>
        <option value="0"  {{#if (eq bonusmalus  0)}}selected{{/if}}>0 (aucun)</option>
        <option value="1"  {{#if (eq bonusmalus  1)}}selected{{/if}}>+1 dé</option>
        <option value="2"  {{#if (eq bonusmalus  2)}}selected{{/if}}>+2 dés</option>
        <option value="3"  {{#if (eq bonusmalus  3)}}selected{{/if}}>+3 dés</option>
        <option value="4"  {{#if (eq bonusmalus  4)}}selected{{/if}}>+4 dés</option>
        <option value="5"  {{#if (eq bonusmalus  5)}}selected{{/if}}>+5 dés</option>
      </select>
    </div>
  </div>

  <div class="cde-roll-section">
    <div class="cde-roll-field">
      <label>{{ localize "CDE.WoundMalus" }}</label>
      <select name="woundmalus">
        <option value="0"  {{#if (eq woundmalus  0)}}selected{{/if}}>0 — Indemne</option>
        <option value="-1" {{#if (eq woundmalus -1)}}selected{{/if}}>−1 dé — Blessé</option>
        <option value="-2" {{#if (eq woundmalus -2)}}selected{{/if}}>−2 dés — Gravement blessé</option>
        <option value="-3" {{#if (eq woundmalus -3)}}selected{{/if}}>−3 dés — Critique</option>
      </select>
    </div>
    <div class="cde-roll-field">
      <label>{{ localize "CDE.BonusAuspiciousDice" }}</label>
      <select name="bonusauspiciousdice">
        <option value="0" {{#if (eq bonusauspiciousdice 0)}}selected{{/if}}>0 dé-faste</option>
        <option value="1" {{#if (eq bonusauspiciousdice 1)}}selected{{/if}}>1 dé-faste</option>
        <option value="2" {{#if (eq bonusauspiciousdice 2)}}selected{{/if}}>2 dés-fastes</option>
        <option value="3" {{#if (eq bonusauspiciousdice 3)}}selected{{/if}}>3 dés-fastes</option>
        <option value="4" {{#if (eq bonusauspiciousdice 4)}}selected{{/if}}>4 dés-fastes</option>
        <option value="5" {{#if (eq bonusauspiciousdice 5)}}selected{{/if}}>5 dés-fastes</option>
      </select>
    </div>
  </div>

  <div class="cde-roll-section">
    <div class="cde-roll-field">
      <label>{{ localize "CDE.TypeOfThrow" }}</label>
      <select name="typeofthrow">
        <option value="0" {{#if (eq typeofthrow 0)}}selected{{/if}}>{{ localize "CDE.Everybody" }}</option>
        <option value="1" {{#if (eq typeofthrow 1)}}selected{{/if}}>{{ localize "CDE.JustDMAndMe" }}</option>
        <option value="2" {{#if (eq typeofthrow 2)}}selected{{/if}}>{{ localize "CDE.DMOnly" }}</option>
        <option value="3" {{#if (eq typeofthrow 3)}}selected{{/if}}>{{ localize "CDE.MeOnly" }}</option>
      </select>
    </div>
  </div>

</div>
