<div id="popover-content">
  <ng-container *ngIf="molecularProfile$ | ngrxPush as mp">
    <nz-card
      [nzTitle]="cardTitle"
      nzBordered="false"
      id="card-content"
      [nzExtra]="cardExtra">
      <!-- popover title -->
      <ng-template #cardTitle>
        <i
          nz-icon
          nzType="civic:molecularprofile"></i>
        {{ mp.name }}
      </ng-template>
      <!-- revision, comment, flag counts -->
      <ng-template #cardExtra>
        <cvc-entity-child-counts
          [cvcEntity]="mp"
          cvcRoute="molecular-profiles"></cvc-entity-child-counts>
      </ng-template>

      <nz-descriptions
        nzSize="small"
        [nzColumn]="2"
        nzBordered="true">
        <!-- molecular profile expression -->
        <nz-descriptions-item
          nzTitle="MP Expression"
          nzSpan="2">
          <cvc-mp-tag-name
            [nameSegments]="mp.parsedName"
            [enablePopover]="false"></cvc-mp-tag-name>
        </nz-descriptions-item>

        <!-- evidence item count -->
        <nz-descriptions-item
          *ngIf="mp.evidenceItems.totalCount > 0"
          nzTitle="Evidence Items"
          nzSpan="2">
          {{ mp.evidenceItems.totalCount }}
        </nz-descriptions-item>

        <nz-descriptions-item
          *ngIf="mp.assertions.totalCount > 0"
          nzTitle="Assertions"
          nzSpan="2">
          {{ mp.assertions.totalCount }}
        </nz-descriptions-item>

        <!-- aliases -->
        <nz-descriptions-item nzTitle="Aliases">
          <ng-container
            *ngIf="mp.molecularProfileAliases.length > 0; else noAliases">
            <cvc-tag-list>
              <nz-tag *ngFor="let alias of mp.molecularProfileAliases">{{
                alias
              }}</nz-tag>
            </cvc-tag-list>
          </ng-container>
          <ng-template #noAliases>
            <span
              nz-typography
              nzType="secondary"
              >None specified</span
            >
          </ng-template>
        </nz-descriptions-item>
      </nz-descriptions>
    </nz-card>
  </ng-container>
</div>
