<div class="oh-roll-dialog oh-defense-dialog">

  {{!-- Pool preview -------------------------------------------------------}}
  <div class="pool-info-line">
    {{localize "OATHHAMMER.Skill.Defense"}} ({{localize "OATHHAMMER.Attribute.Agility"}} {{agiRank}})
    + {{localize "OATHHAMMER.Label.SkillRank"}} {{defRank}}
    {{#if armorPenalty}} {{armorPenalty}} {{localize "OATHHAMMER.Dialog.ArmorPenalty"}}{{/if}}
  </div>

  {{!-- Trait summary -------------------------------------------------------}}
  {{#if parryCount}}
  <div class="oh-trait-info">
    <i class="fa-solid fa-shield-halved"></i>
    {{localize "OATHHAMMER.Dialog.ParryActive"}}{{#if (gte parryCount 2)}} (+1){{/if}}
  </div>
  {{/if}}
  {{#if blockCount}}
  <div class="oh-trait-info">
    <i class="fa-solid fa-shield-halved"></i>
    {{localize "OATHHAMMER.Dialog.BlockActive"}}
  </div>
  {{/if}}

  <fieldset class="attack-options-block">
    <legend>{{localize "OATHHAMMER.Dialog.DefenseOptions"}}</legend>

    {{!-- Attack type --------------------------------------------------------}}
    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.AttackType"}}</label>
      <select name="attackType">
        {{#each attackTypeOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
    </div>

    {{!-- Governing attribute (melee can use Might) --------------------------}}
    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.GoverningAttr"}}</label>
      <select name="attribute">
        {{#each attrOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.MightMeleeHint"}}</span>
    </div>

    {{!-- Manual bonus -------------------------------------------------------}}
    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.Modifier"}}</label>
      <select name="bonus">
        {{#each bonusOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.AttackModifierHint"}}</span>
    </div>

  </fieldset>

  {{!-- Visibility -----------------------------------------------------------}}
  <fieldset class="roll-visibility-block">
    <legend>{{localize "OATHHAMMER.Dialog.Visibility"}}</legend>
    <select name="visibility">
      {{selectOptions rollModes selected=visibility localize=true}}
    </select>
  </fieldset>

</div>
