<div class="bol-damage-card">
  <div class="damage-card-header">
    <img class="damage-weapon-img" src="{{weapon.img}}" alt="{{weapon.name}}"/>
    <div class="damage-card-title">
      <div class="damage-card-label">⚔ {{localize "BOL.ui.damages"}}</div>
      <div class="damage-weapon-name">{{weapon.name}}</div>
      <div class="damage-formula">{{damageFormula}}</div>
      <div class="damage-total-badge">{{damageRoll.total}}</div>
    </div>
  </div>

  {{#if defender}}
    <div class="damage-target">{{localize "BOL.chat.damagetarget" target=defender.name}}</div>
  {{/if}}

  {{#if weapon.system.properties.damageReroll1}}
    <div class="damage-note">{{localize "BOL.chat.weaponreroll1"}}</div>
  {{/if}}

  {{#if targetId}}
  <div class="actions-section" id="{{applyId}}">
    <button class="chat-damage-apply" data-attack-id="{{id}}">{{localize "BOL.chat.applydamagetotarget"}}</button>
  </div>
  {{else}}
  {{#if potentialTargets}}
  <div class="actions-section damage-target-select" id="{{applyId}}">
    <div class="damage-target-select-label">{{localize "BOL.chat.selecttarget"}}</div>
    {{#each potentialTargets}}
      <button class="chat-target-select" data-attack-id="{{../id}}" data-token-id="{{this.id}}" data-actor-id="{{this.actorId}}">
        <img src="{{this.img}}" class="damage-target-icon" alt="{{this.name}}"/>{{this.name}}
      </button>
    {{/each}}
  </div>
  {{/if}}
  {{/if}}
</div>
