<section class="dnc-chat-card dnc-chat-card-roll">
  <header class="chat-card-header">
    <div class="chat-card-heading">
      <p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Resolution"}}</p>
      <h2>{{title}}</h2>
      {{#if subtitle}}<p class="chat-card-subtitle">{{subtitle}}</p>{{/if}}
    </div>
    <div class="chat-card-seal {{#if success}}success{{else}}failure{{/if}}">
      {{#if success}}OK{{else}}KO{{/if}}
    </div>
  </header>
  <div class="chat-pill-row">
    <span class="chat-pill {{#if success}}success{{else}}failure{{/if}}">{{#if success}}{{localize "DNC.Chat.Success"}}{{else}}{{localize "DNC.Chat.Failure"}}{{/if}}</span>
    {{#if modeLabel}}<span class="chat-pill">{{modeLabel}}</span>{{/if}}
    {{#if favorLabel}}<span class="chat-pill">{{localize "DNC.Chat.Favor"}} {{favorLabel}}</span>{{/if}}
    {{#if targetPillLabel}}<span class="chat-pill">{{targetPillLabel}} {{targetPillValue}}</span>{{else}}<span class="chat-pill">{{localize "DNC.Chat.Target"}} {{target}}</span>{{/if}}
    {{#if keptPillLabel}}<span class="chat-pill">{{keptPillLabel}} {{keptPillValue}}</span>{{else}}<span class="chat-pill">{{localize "DNC.Chat.Kept"}} {{kept}}</span>{{/if}}
  </div>
  <div class="chat-keyline">
    <span class="chat-keyline-label">{{localize "DNC.Chat.Rolls"}}</span>
    <p class="roll-values">{{#each values}}<span>{{this}}</span>{{/each}}</p>
  </div>
  {{#if favorNote}}
    <p class="chat-note"><strong>{{localize "DNC.Chat.Favor"}}</strong> : {{favorNote}}</p>
  {{/if}}
  {{#if showDamageButton}}
    <div class="chat-actions">
      <button type="button" class="chat-action-button" data-action="rollChatDamage" data-item-uuid="{{itemUuid}}">
        <i class="fa-solid fa-burst"></i> {{localize "DNC.Chat.RollDamage"}}
      </button>
      {{#if showAmmoButton}}
        <button type="button" class="chat-action-button" data-action="rollAmmoUsage" data-item-uuid="{{itemUuid}}">
          <i class="fa-solid fa-bullseye"></i> {{localize "DNC.Chat.RollAmmunition"}}
        </button>
      {{/if}}
    </div>
  {{else}}
    {{#if showAmmoButton}}
      <div class="chat-actions">
        <button type="button" class="chat-action-button" data-action="rollAmmoUsage" data-item-uuid="{{itemUuid}}">
          <i class="fa-solid fa-bullseye"></i> {{localize "DNC.Chat.RollAmmunition"}}
        </button>
      </div>
    {{/if}}
  {{/if}}
  <ul class="chat-details chat-details-ornate">
    {{#each details}}
      <li><strong>{{this.label}}</strong> : {{this.value}}</li>
    {{/each}}
  </ul>
</section>
