<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <form [formGroup]="createDatabaseBackupForm" appFormSubmit layoutDirection="column" (ngSubmit)="createBackup()">
      <app-form-errors #formErrors [formGroup]="createDatabaseBackupForm"></app-form-errors>
      <mat-form-field appFlex="100">
        <mat-label i18n>Name</mat-label>
        <input matInput placeholder="Name" i18n-placeholder formControlName="name" type="text">
        <mat-error i18n>{{createDatabaseBackupForm.controls.name.errors | errorFormatter}}</mat-error>
      </mat-form-field>

      <mat-form-field appFlex="100">
        <mat-label i18n>Swift container name</mat-label>
        <input matInput placeholder="Swift container name" i18n-placeholder formControlName="swift_container"
               type="text">
        <mat-error i18n>{{createDatabaseBackupForm.controls.swift_container.errors | errorFormatter}}</mat-error>
        <mat-hint i18n>
          Swift container name. Leave blank to use default.
        </mat-hint>
      </mat-form-field>

      <div>
        <mat-checkbox formControlName="incremental" [color]="'primary'" i18n>Incremental</mat-checkbox>
        <app-icon [icon]="incrementalInfo"></app-icon>
      </div>
    </form>
  </ng-template>
</app-common-dialog>
