@if (node) {
  <ng-container>
    <a
      *ngIf="isUrlLink; else plain"
      [ngStyle]="ngStyle"
      [mmObfuscated]="style.obfuscated"
      [attr.title]="hoverTitle"
      [attr.href]="node.clickEvent?.value"
      [attr.data-insertion]="node.insertion || null"
      target="_blank"
      rel="noopener noreferrer"
      class="mm-node mm-link"
    >{{ text }}</a>

    <ng-template #plain>
          <span
            [ngStyle]="ngStyle"
            [mmObfuscated]="style.obfuscated"
            [attr.title]="hoverTitle"
            [attr.data-insertion]="node.insertion || null"
            [class.mm-clickable]="hasNonUrlClick"
            class="mm-node"
            (click)="onClick()"
          >{{ text }}</span
          >
    </ng-template>
    @for (child of node.extra; track child) {
      <mini-message [node]="child" [parentStyle]="style"></mini-message>
    }
  </ng-container>
}
