<app-common-dialog [dialogContent]="dialogContent" [addCancelDialogButton]="false" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <p *ngIf="data.message">{{data.message}}</p>
    <div *ngIf="data.htmlMessage" [innerHTML]="data.htmlMessage"></div>
    <p *ngIf="data.secondaryMessage">{{data.secondaryMessage}}</p>
    <pre *ngIf="data.importantMessage" class="break-spaces fl-important-text">{{data.importantMessage}}</pre>
    <app-form-errors #formErrors></app-form-errors>
    <ng-container *ngIf="data.flags">
      <div *ngFor="let flag of data.flags">
        <mat-checkbox [(ngModel)]="flag.selected" (change)="flagsChanged()" color="primary">
          {{flag.message}}
        </mat-checkbox>
        <div *ngIf="flag.warningOnSelect && flag.selected">
          <span class="fl-red-color">{{flag.warningOnSelect}}</span>
        </div>
      </div>
    </ng-container>
    <ng-container *ngIf="data.radioButtons">
      <mat-radio-group [(ngModel)]="selectedRadioButton" (change)="flagsChanged()"
                       layoutDirection="column" appLayoutGap="10px" class="fl-margin-bottom">
        <mat-radio-button color="primary" *ngFor="let radioButton of data.radioButtons" [value]="radioButton.id">
          {{radioButton.message}}
        </mat-radio-button>
      </mat-radio-group>
      <span class="fl-red-color">{{getWarningMessage()}}</span>
    </ng-container>
  </ng-template>
</app-common-dialog>
