<div class="les-oublies-roll-dialog">
  <div class="sheet-grid sheet-grid-2">
    <section class="sheet-card">
      <h2>{{localize "LESOUBLIES.rolls.attacker"}}</h2>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.label"}}</label>
        <input name="attackerLabel" type="text" value="{{actor.name}}" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.score"}}</label>
        <input name="attackerScore" type="number" value="0" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.difficulty"}}</label>
        <input name="attackerDifficulty" type="number" value="0" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.rollMode"}}</label>
        <select name="attackerRollMode">
          {{#each rollModes as |mode|}}
            <option value="{{mode.value}}" {{#if (eq mode.value @root.defaultRollMode)}}selected{{/if}}>{{mode.label}}</option>
          {{/each}}
        </select>
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.extraDie"}}</label>
        <select name="attackerExtraDie">
          {{#each extraDieModes as |mode|}}
            <option value="{{mode.value}}">{{mode.label}}</option>
          {{/each}}
        </select>
      </div>
      <p class="help-text">{{localize "LESOUBLIES.rolls.resourceState"}} : Songes {{attackerResources.songesPoints}} / {{attackerResources.songesValue}} · Cauchemar {{attackerResources.cauchemarPoints}} / {{attackerResources.cauchemarValue}}</p>
    </section>

    <section class="sheet-card">
      <h2>{{localize "LESOUBLIES.rolls.defender"}}</h2>
      <p class="help-text target-status" data-target-status data-state="{{targetStatus.state}}">{{targetStatus.message}}</p>
      <div class="field-row">
        <label>Adversaire</label>
        <select name="defenderActorId">
          {{#each targetOptions as |entry|}}
            <option value="{{entry.value}}" {{#if (eq entry.value @root.values.defenderActorId)}}selected{{/if}}>{{entry.label}}</option>
          {{/each}}
        </select>
      </div>
      <div class="field-row">
        <label>Compétence adverse</label>
        <select name="defenderSkill">
          {{#each defenderSkillOptions as |entry|}}
            <option value="{{entry.value}}" {{#if (eq entry.value @root.values.defenderSkill)}}selected{{/if}}>{{entry.label}}</option>
          {{/each}}
        </select>
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.label"}}</label>
        <input name="defenderLabel" type="text" value="{{values.defenderLabel}}" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.score"}}</label>
        <input name="defenderScore" type="number" value="0" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.difficulty"}}</label>
        <input name="defenderDifficulty" type="number" value="0" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.rollMode"}}</label>
        <select name="defenderRollMode">
          {{#each rollModes as |mode|}}
            <option value="{{mode.value}}" {{#if (eq mode.value @root.defaultRollMode)}}selected{{/if}}>{{mode.label}}</option>
          {{/each}}
        </select>
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.rolls.extraDie"}}</label>
        <select name="defenderExtraDie">
          {{#each extraDieModes as |mode|}}
            <option value="{{mode.value}}">{{mode.label}}</option>
          {{/each}}
        </select>
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.ui.songes"}}</label>
        <input name="defenderSongesValue" type="number" value="{{defenderResources.songesValue}}" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.labels.pointsSonges"}}</label>
        <input name="defenderSongesPoints" type="number" value="{{defenderResources.songesPoints}}" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.ui.cauchemar"}}</label>
        <input name="defenderCauchemarValue" type="number" value="{{defenderResources.cauchemarValue}}" />
      </div>
      <div class="field-row">
        <label>{{localize "LESOUBLIES.labels.pointsCauchemar"}}</label>
        <input name="defenderCauchemarPoints" type="number" value="{{defenderResources.cauchemarPoints}}" />
      </div>
      <p class="help-text">Vous pouvez choisir un adversaire depuis la liste ou conserver la saisie manuelle des valeurs.</p>
    </section>
  </div>

  <section class="sheet-card">
    <div class="field-row">
      <label>{{localize "LESOUBLIES.rolls.confrontationType"}}</label>
      <select name="confrontationType">
        <option value="directe">{{localize "LESOUBLIES.rolls.confrontationTypes.directe"}}</option>
        <option value="differee">{{localize "LESOUBLIES.rolls.confrontationTypes.differee"}}</option>
      </select>
    </div>
    <p class="help-text">{{localize "LESOUBLIES.rolls.confrontationHint"}}</p>
  </section>
</div>
