<div class="{{cssClass}}">
  <div class="sortilege-header">
    <img src="{{actingCharImg}}" class="actor-avatar" data-tooltip="{{actingCharName}}" />
    <div>
      <h3>{{spell.name}}</h3>
      <span>{{categorieLabel}} · {{niveauLabel}}</span>
    </div>
  </div>

  <div class="sortilege-cards-used">
    <h4>{{localize "HAMALRON.Sortilege.atoutsUsed"}}</h4>
    <div class="used-cards">
      {{#each atoutsUtilises}}
        <div class="used-card">
          <img src="{{this.img}}" />
          <span>{{this.name}}</span>
        </div>
      {{/each}}
    </div>
    {{#if cartesCoupeUtilisees.length}}
      <h4>{{localize "HAMALRON.Sortilege.coupeUsed"}}</h4>
      <div class="used-cards">
        {{#each cartesCoupeUtilisees}}
          <div class="used-card">
            <img src="{{this.img}}" />
            <span>{{this.name}}</span>
          </div>
        {{/each}}
      </div>
    {{/if}}
  </div>

  <div class="sortilege-result">
    <div class="calc-row">
      <span>{{localize "HAMALRON.Sortilege.playerTotal"}}</span>
      <span>{{totalJoueur}}</span>
    </div>
    <div class="calc-row">
      <span>{{localize "HAMALRON.Sortilege.totalDifficulty"}}</span>
      <span>{{difficulte}} (carte {{carteMJ}} + {{modificateur}})</span>
    </div>
    <div class="calc-divider"></div>
    <div class="calc-row total-row {{#if isSuccess}}result-success{{else}}result-failure{{/if}}">
      <span>
        {{#if isSuccess}}
          <i class="fas fa-check-circle"></i> {{localize "HAMALRON.Label.success"}}
        {{else if isCritique}}
          <i class="fas fa-bolt"></i> {{localize "HAMALRON.Sortilege.failureCritical"}}
        {{else}}
          <i class="fas fa-times-circle"></i> {{localize "HAMALRON.Sortilege.failureNormal"}}
        {{/if}}
      </span>
    </div>
  </div>
</div>
