<h3 mat-dialog-title>
  Arguments to {{data.name}}
</h3>

<form
  [formGroup]="form"
  (ngSubmit)="onSubmit(model)">

  <div mat-dialog-content>

    <div class="text-muted mb-3" [innerHTML]="data.description | marked"></div>
    <div *ngIf="data.warning" class="warning mb-3">{{data.warning}}</div>

    <formly-form
      [form]="form"
      [fields]="fields"
      [model]="model">
    </formly-form>

  </div>

  <div mat-dialog-actions [align]="'end'">

    <button
      mat-button
      mat-dialog-close>
      Close
    </button>

    <button
      mat-flat-button
      type="submit"
      color="primary"
      (click)="selectWithoutGenerating(model)">
      {{data.button ?? 'Save'}}
    </button>

    <button
      *ngIf="data.generate"
      matTooltip="Submits your comment and runs it through the Hyperlambda Generator to generate whatever your comment claims the file is doing"
      mat-flat-button
      class="ai-generator"
      color="primary"
      type="button"
      (click)="selectAndGenerate(model)">
      Save &amp; Generate
    </button>

  </div>

</form>
