<ng-template #help>
  <div class="preserve-line-breaks ds-context-help-content">
    @for (elem of (parsedContent$ | async); track elem) {
      @if (elem.href) {
        <a href="{{elem.href}}" target="_blank" rel="noopener noreferrer">{{elem.text}}</a>
      } @else {
        {{ elem.text }}
      }
    }
  </div>
</ng-template>
@if (shouldShowIcon$ | async) {
  <i
   [ngClass]="{'ds-context-help-icon fas fa-question-circle shadow-sm': true,
              'ds-context-help-icon-right': iconPlacement !== 'left',
              'ds-context-help-icon-left': iconPlacement === 'left'}"
    [ngbTooltip]="help"
    [placement]="tooltipPlacement"
    autoClose="outside"
    triggers="manual"
    container="body"
    #tooltip="ngbTooltip"
    (click)="onClick()">
  </i>
}
<ng-container *ngTemplateOutlet="templateRef"></ng-container>
