<div class="chat-message-header">
  {{#if actorImg}}
  <img class="actor-icon" src="{{actorImg}}" alt="{{alias}}" />
  {{/if}}
  <h4 class="chat-actor-name">{{alias}}</h4>
</div>

<div class="ecryme-chat-body">

  {{#if img}}
  <div class="ecryme-chat-icon-row">
    <img class="chat-icon" src="{{img}}" alt="{{name}}" />
  </div>
  {{/if}}

  <ul>
    {{#if skill}}
      <li>{{localize skill.name}}: <strong>{{skill.max}} ({{skill.value}})</strong></li>
      {{#if spec}}
        <li>{{localize "ECRY.chat.specialization"}} {{spec.name}} (+{{spec.system.bonus}})</li>
      {{/if}}
    {{/if}}

    {{#if impactMalus}}
      <li>{{localize "ECRY.ui.impactmalus"}}: <strong>{{impactMalus}}</strong></li>
    {{/if}}

    {{#if skillTranscendence}}
      <li>{{localize "ECRY.ui.skilltranscendence"}}: <strong>{{skillTranscendence}}</strong></li>
    {{/if}}

    {{#if traitsBonusList}}
      {{#each traitsBonusList as |trait idx|}}
      <li>{{localize "ECRY.chat.traitbonus"}}: <strong>{{trait.name}}</strong> ({{trait.system.level}})</li>
      {{/each}}
    {{/if}}
    {{#if traitsMalusList}}
      {{#each traitsMalusList as |trait idx|}}
      <li>{{localize "ECRY.chat.traitmalus"}}: <strong>{{trait.name}}</strong> ({{trait.system.level}})</li>
      {{/each}}
    {{/if}}
    {{#if bonusMalusTraits}}
      <li>{{localize "ECRY.chat.bonusmalustraits"}}: <strong>{{bonusMalusTraits}}</strong></li>
    {{/if}}

    <li>{{localize "ECRY.chat.formula"}}: <strong>{{diceFormula}}</strong></li>
    <li>{{localize "ECRY.chat.dicesum"}}: <strong>{{diceSum}}</strong></li>
    <li>{{localize "ECRY.chat.result"}}: <strong>{{total}}</strong></li>
    {{#if difficulty}}
      <li>{{localize "ECRY.chat.difficulty"}}: {{difficulty}} — {{localize "ECRY.chat.margin"}}: <strong>{{margin}}</strong></li>
      {{#if isSuccess}}
        <li class="ecryme-result-line"><label class="chat-result-text chat-result-success">{{localize "ECRY.chat.success"}}</label></li>
      {{else}}
        <li class="ecryme-result-line"><label class="chat-result-text chat-result-failure">{{localize "ECRY.chat.failure"}}</label></li>
      {{/if}}
    {{/if}}
  </ul>

</div>
