<section class="dnc-chat-card dnc-chat-card-item dnc-chat-card-mission-pack">
  <header class="chat-card-header">
    <div class="chat-card-heading">
      <p class="chat-card-kicker">{{localize "DNC.Chat.Kicker.Logistics"}}</p>
      <h2>{{title}}</h2>
      <p class="chat-card-subtitle">{{actorName}}</p>
    </div>
    <div class="chat-card-seal {{#if missingCount}}failure{{else}}success{{/if}}">
      {{createdCount}}
    </div>
  </header>

  <div class="chat-pill-row">
    <span class="chat-pill">{{localize "DNC.Macro.MissionPack.ActiveMode"}} {{generationModeLabel}}</span>
    {{#if isCampaign}}<span class="chat-pill">{{localize "DNC.Macro.MissionPack.CampaignController"}} {{controllerName}}</span>{{/if}}
    {{#if isCampaign}}<span class="chat-pill">{{localize "DNC.Macro.MissionPack.CampaignRelation"}} {{stewardRelationLabel}}</span>{{/if}}
    <span class="chat-pill success">{{localize "DNC.Macro.MissionPack.ItemsAdded"}} {{createdCount}}</span>
    {{#if missingCount}}<span class="chat-pill failure">{{localize "DNC.Macro.MissionPack.ItemsMissing"}} {{missingCount}}</span>{{/if}}
  </div>

  <p class="chat-note">
    {{#if missingCount}}
      {{localize "DNC.Macro.MissionPack.PartialChatSummary"}}
    {{else}}
      {{localize "DNC.Macro.MissionPack.CompleteChatSummary"}}
    {{/if}}
  </p>

  <ul class="chat-details">
    {{#each draws}}
      <li>
        <strong>{{this.label}}</strong> : {{this.display}}
        {{#if this.dieLabel}}
          <br>{{localize "DNC.Macro.MissionPack.RollDetail" die=this.dieLabel mode=this.modeLabel values=this.rollValuesLabel kept=this.kept rank=this.rankBonus total=this.total}}
          {{#if this.clamped}}<br>{{localize "DNC.Macro.MissionPack.TotalClamped" total=this.total clamped=this.resolvedTotal}}{{/if}}
        {{/if}}
        {{#if this.missingSummary}}<br>{{localize "DNC.Macro.MissionPack.Missing"}} : {{this.missingSummary}}{{/if}}
      </li>
    {{/each}}
  </ul>

  <div class="chat-pill-row">
    <span class="chat-pill">{{localize "DNC.Macro.MissionPack.UniqueReference"}} {{uniqueEntry.referenceRoll}}</span>
    <span class="chat-pill">{{localize "DNC.Macro.MissionPack.UniqueActorRoll"}} {{uniqueEntry.actorRoll}}</span>
    <span class="chat-pill {{#if uniqueEntry.matched}}success{{else}}failure{{/if}}">
      {{#if uniqueEntry.matched}}
        {{localize "DNC.Macro.MissionPack.UniqueMatch"}}
      {{else}}
        {{localize "DNC.Macro.MissionPack.UniqueMiss"}}
      {{/if}}
    </span>
  </div>

  {{#if uniqueEntry.matched}}
    <p class="chat-note">
      <strong>{{localize "DNC.Macro.MissionPack.UniqueGranted"}}</strong> {{uniqueEntry.itemName}}
      {{#if uniqueEntry.uniqueRoll}}({{localize "DNC.Macro.MissionPack.UniqueTableRoll"}} {{uniqueEntry.uniqueRoll}}){{/if}}
    </p>
  {{else}}
    <p class="chat-note">{{localize "DNC.Macro.MissionPack.UniqueRuleReminder"}}</p>
  {{/if}}
</section>
