<form class="combat-actions-dialog">
  
  <h2 class="compdialog" id="combatActions">Combat Actions for round {{round}}</h2>
  
  <section class="sheet-body">
    <div class="tab" data-group="primary">
      <div class="flexrow">
        <label for="categorie generic-label">AP available : </label>
        <select name="actionMax" id="actionMax" data-dtype="number">
          {{#select actionMax}}
          {{#each actionPoints as |point key|}}
          <option value={{key}} {{#if (eq key 3)}}selected{{/if}}>{{point}}</option>
          {{/each}}
          {{/select}}
      </select>
      </div>
    <div>
      <label for="categorie generic-label">Remaining AP : <span id="remain-ap">3</span> </label>
    </div>
    <hr>
    <div class="tab" data-group="primary">
      <div class="flexrow">
        <label for="categorie generic-label">Phase 3 action (3 AP)</label>
        <select name="action3" class='action-select' id="action3" data-dtype="number">
          {{#select action3}}
          {{#each actionsList as |action key|}}
          <option value={{key}} {{#if (eq action.name "No Action")}}selected{{/if}}>{{action.name}} (min AP :  {{action.data.minap}})</option>
          {{/each}}
          {{/select}}
        </select>      
        <label for="categorie generic-label">&nbsp;Target (optional) </label>
        <select name="combatant3" class='action-select' id="combatant3" data-dtype="String">
          {{#select combatant3}}
          {{#each combatantsList as |combatant key|}}
          <option value={{combatant._id}}>{{combatant.actor.data.name}}</option>
          {{/each}}
          {{/select}}
        </select>
      </div>
    </div>

    <div class="tab" data-group="primary">
      <div class="flexrow">
        <label for="categorie generic-label">Phase 2 action (2 AP)</label>
        <select name="action2" class='action-select' id="action2" data-dtype="number">
          {{#select action2}}
          {{#each actionsList as |action key|}}
          <option value={{key}} {{#if (eq action.name "No Action")}}selected{{/if}}>{{action.name}} (min AP :  {{action.data.minap}})</option>
          {{/each}}
          {{/select}}
      </select>
      <label for="categorie generic-label">&nbsp;Target (optional) </label>
      <select name="combatant2" class='action-select' id="combatant2" data-dtype="String">
        {{#select combatant2}}
        {{#each combatantsList as |combatant key|}}
        <option value={{combatant._id}}>{{combatant.actor.data.name}}</option>
        {{/each}}
        {{/select}}
      </select>
      </div>
    </div>

    <div class="tab" data-group="primary">
      <div class="flexrow">
        <label for="categorie generic-label">Phase 1 action (1 AP)</label>
        <select name="action1" class='action-select' id="action1" data-dtype="number">
          {{#select action1}}
          {{#each actionsList as |action key|}}
          <option value={{key}} {{#if (eq action.name "No Action")}}selected{{/if}}>{{action.name}} (min AP :  {{action.data.minap}})</option>
          {{/each}}
          {{/select}}
        </select>
        <label for="categorie generic-label">&nbsp;Target (optional) </label>
        <select name="combatant1" class='action-select' id="combatant1" data-dtype="String">
          {{#select combatant1}}
          {{#each combatantsList as |combatant key|}}
          <option value={{combatant._id}}>{{combatant.actor.data.name}}</option>
          {{/each}}
          {{/select}}
        </select>
      </div>
    </div>

  </section>

</form>