<form class="chateau-dormant">
  <div class="flexcol">
    <div class="form-group">
      <label for="motifStress">Motif de stress</label>
      <input name="motifStress" value="{{motifStress}}" type="text" data-dtype="String" />
    </div>
    <hr>
    <ul class="item-list alterne-list">
      <li class="competence-header flexrow">
        <span class="flex-grow-3">Personnage</span>
        <span class="flex-shrink">Insomnie</span>
        <span class="flex-grow-1">Sommeil</span>
        <span class="flex-shrink">Stress</span>
        <span class="flex-grow-1">Moral</span>
        <span class="flex-shrink">Ignorer</span>
      </li>
      {{#each actors as |actor|}}
      <li class="item flexrow list-item set-sommeil-actor" data-actor-id="{{actor.id}}">
        <span class="flex-grow-3">
          <label>
            <img class="chat-icon" src="{{actor.img}}" data-tooltip="{{actor.name}}" />
            <span>{{actor.name}}</span>
          </label>
        </span>
        <span class="flex-shrink">
          <input type="checkbox" class="sommeil-insomnie" {{#if actor.system.sommeil.insomnie}}checked{{/if}}>
        </span>
        <span class="flex-grow-1">
          <input value="{{#if actor.system.sommeil.insomnie}}0{{else}}4{{/if}}" 
              min="0" max="{{#if actor.system.sommeil.insomnie}}0{{else}}12{{/if}}"
              class="number-x sommeil-heures" type="number" data-dtype="Number" 
              {{#if actor.system.sommeil.insomnie}}disabled{{/if}}/>
          h
        </span>
        <span class="flex-shrink">
          <input value="0" min="0" max="200" class="number-x2 sommeil-stress" type="number" data-dtype="Number" />
        </span>
        <span class="flex-grow-1 flexrow sommeil-actor-moral">
          {{> "systems/foundryvtt-reve-de-dragon/templates/sommeil/sommeil-actor-moral.hbs" actor.system.sommeil}}
        </span>
        <span class="flex-shrink">
          <input class="sommeil-ignorer" type="checkbox">
        </span>
      </li>
      {{/each}}
    </ul>
  </div>
</form>
