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

  {{!-- Actor name --}}
  <div class="roll-actor-name">{{actorName}}</div>

  {{!-- Skill / pool info --}}
  <fieldset class="roll-info-block">
    <legend>{{localize "OATHHAMMER.Dialog.SkillCheck"}}</legend>

    <div class="roll-skill-line">
      <span class="roll-skill-name">{{skillLabel}}</span>
      <span class="roll-attr-info">
        {{attrLabel}} ({{attrRank}}) + {{localize "OATHHAMMER.Label.SkillRank"}} ({{skillRank}})
        {{#if skillMod}}+ {{localize "OATHHAMMER.Label.SkillModifier"}} ({{skillMod}}){{/if}}
      </span>
    </div>

    <div class="roll-dice-preview">
      <span class="roll-pool">{{baseTotal}}d6</span>
      <span class="roll-color-badge color-badge-{{colorType}}">{{colorLabel}} &nbsp;{{threshold}}+</span>
    </div>

    {{!-- Attribute override for dual-attribute skills (Defense, Fighting, Magic) --}}
    {{#if isDualAttr}}
    <div class="roll-dual-attr">
      <label>{{localize "OATHHAMMER.Dialog.Attribute"}}</label>
      <select name="attrOverride">
        {{#each attrOptions as |opt|}}
        <option value="{{opt.value}}" {{#if opt.selected}}selected{{/if}}>{{opt.label}}</option>
        {{/each}}
      </select>
    </div>
    {{/if}}
  </fieldset>

  {{!-- Roll options --}}
  <fieldset class="roll-options-block">
    <legend>{{localize "OATHHAMMER.Dialog.Options"}}</legend>

    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.DV"}}</label>
      <select name="dv">
        {{#each dvOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.DVHint"}}</span>
    </div>

    <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.ModifierHint"}}</span>
    </div>

    <div class="roll-option-row">
      <label>{{localize "OATHHAMMER.Dialog.Supporters"}}</label>
      <select name="supporters">
        {{#each supportersOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.SupportersHint"}}</span>
    </div>

    <div class="roll-option-row roll-option-check">
      <label for="explodeOn5">{{localize "OATHHAMMER.Dialog.ExplodeOn5"}}</label>
      <input type="checkbox" id="explodeOn5" name="explodeOn5" value="true" />
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.ExplodeOn5Hint"}}</span>
    </div>

    {{#if availableLuck}}
    <div class="roll-option-row roll-option-luck">
      <label>{{localize "OATHHAMMER.Dialog.LuckSpend"}} <i class="fa-solid fa-clover luck-icon"></i></label>
      <select name="luckSpend">
        {{#each luckOptions}}<option value="{{value}}"{{#if selected}} selected{{/if}}>{{label}}</option>{{/each}}
      </select>
      <label class="luck-human-label" for="luckIsHuman">{{localize "OATHHAMMER.Dialog.LuckHuman"}}</label>
      <input type="checkbox" id="luckIsHuman" name="luckIsHuman" value="true" {{#if isHuman}}checked{{/if}} />
      <span class="roll-option-hint">{{localize "OATHHAMMER.Dialog.LuckHint"}} ({{availableLuck}} {{localize "OATHHAMMER.Dialog.Available"}})</span>
    </div>
    {{/if}}
  </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>
