<form [formGroup]="formGroup" [bitSubmit]="submit">
  <bit-dialog dialogSize="default">
    <ng-container bitDialogTitle>{{ title | i18n }}</ng-container>
    <div bitDialogContent>
      <div *ngIf="loading" class="tw-text-center">
        <i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
      </div>
      <div *ngIf="!loading">
        <bit-form-field>
          <bit-label>{{ "machineAccountName" | i18n }}</bit-label>
          <input appAutofocus formControlName="name" bitInput />
        </bit-form-field>
      </div>
    </div>
    <ng-container bitDialogFooter>
      <button type="submit" bitButton buttonType="primary" bitFormButton>
        {{ "save" | i18n }}
      </button>
      <button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
        {{ "cancel" | i18n }}
      </button>
    </ng-container>
  </bit-dialog>
</form>
