<a
  [routerLink]="revision.link"
  [queryParams]="{ revisionSetId: revision.revisionSetId }">
  <ng-template [ngTemplateOutlet]="tag"></ng-template>
</a>

<ng-template #tag>
  <nz-tag
    nz-popover
    [nzPopoverMouseEnterDelay]="0.5"
    [nzPopoverContent]="revisionPopover"
    [nzPopoverPlacement]="popoverPlacement"
    [nzPopoverTrigger]="enablePopover ? 'hover' : null">
    <ng-template [ngTemplateOutlet]="tagContent"></ng-template>
  </nz-tag>

  <ng-template #revisionPopover>
    <cvc-revision-popover
      [revisionId]="revision.id"
      (contentRendered)="updatePopoverPosition()"></cvc-revision-popover>
  </ng-template>
</ng-template>

<ng-template #tagContent>
  <i
    nz-icon
    nzType="civic-revision"
    nzTheme="twotone"
    nzTwotoneColor="#F0673A"></i>
  {{ revision.name }}
</ng-template>
