<app-common-dialog [dialogContent]="dialogContent" [dialogRef]="dialogRef">
  <ng-template #dialogContent>
    <p i18n>Are you sure you want to unshelve instance {{data.instance.name || data.instance.id}}?</p>
    <form [class.hide]="!showAZSelect" appFormSubmit (ngSubmit)="unshelve()"
          [formGroup]="instanceUnshelveForm" layoutDirection="column">
      <app-form-errors #formErrors [formGroup]="instanceUnshelveForm"></app-form-errors>
      <mat-form-field *ngIf="showAZSelect" appFlex="100">
        <mat-label i18n>Availability zone</mat-label>
          <mat-select formControlName="availabilityZone" placeholder="Availability zone" i18n-placeholder>
            <mat-option [value]="null">
              (none)
            </mat-option>
            <mat-option *ngFor="let availabilityZone of availabilityZones" [value]="availabilityZone">
              {{availabilityZone}}
            </mat-option>
          </mat-select>
      </mat-form-field>
    </form>
  </ng-template>
</app-common-dialog>
