<footer class="footer">
  <div class="container-xl">
    <div class="row text-center" *ngIf="mempoolInfoData$ | async as mempoolInfoData">
      <div class="col d-none d-sm-block">
        <span class="txPerSecond" i18n="footer.tx-vbytes-per-second">Tx vBytes per second:</span>
        <span *ngIf="mempoolInfoData.vBytesPerSecond === 0; else inSync">
          &nbsp;<span class="badge badge-pill badge-warning" i18n="footer.backend-is-synchronizing">Backend is synchronizing</span>
        </span>
        <ng-template #inSync>
          <div class="progress sub-text">
            <div class="progress-bar {{ mempoolInfoData.progressClass }}" role="progressbar" [ngStyle]="{'width': mempoolInfoData.progressWidth}">{{ mempoolInfoData.vBytesPerSecond | ceil | number }} <ng-container i18n="shared.vbytes-per-second|vB/s">vB/s</ng-container></div>
          </div>
        </ng-template>    
      </div>
      <div class="col">
        <span class="unconfirmedTx"><ng-container i18n="dashboard.unconfirmed|Unconfirmed count">Unconfirmed</ng-container>:</span>
        <div class="sub-text">{{ mempoolInfoData.memPoolInfo.size | number }}</div>
      </div>
      <div class="col">
        <span class="mempoolSize"><ng-container i18n="dashboard.mempool-size|Mempool size">Mempool size</ng-container>:</span>
        <div class="sub-text" *ngIf="(mempoolBlocksData$ | async) as mempoolBlocksData"><span [innerHtml]="mempoolBlocksData.size | bytes"></span> (<ng-container *ngTemplateOutlet="mempoolBlocksData.blocks === 1 ? blocksSingular : blocksPlural; context: {$implicit: mempoolBlocksData.blocks }"></ng-container>)</div>
          <ng-template #blocksSingular let-i i18n="shared.block">{{ i }} block</ng-template>
          <ng-template #blocksPlural let-i i18n="shared.blocks">{{ i }} blocks</ng-template>
      </div>
    </div>
  </div>
</footer>
