<bit-dialog #dialog dialogSize="large" background="alt">
  <span bitDialogTitle>{{ "generator" | i18n }}</span>
  <ng-container bitDialogContent>
    <vault-cipher-form-generator
      [type]="data.type"
      [uri]="data.uri"
      (valueGenerated)="onCredentialGenerated($event)"
      (algorithmSelected)="onAlgorithmSelected($event)"
    />
    <bit-item>
      <button type="button" bit-item-content aria-haspopup="dialog" (click)="openHistoryDialog()">
        {{ "generatorHistory" | i18n }}
        <i slot="end" class="bwi bwi-angle-right" aria-hidden="true"></i>
      </button>
    </bit-item>
  </ng-container>
  <ng-container bitDialogFooter>
    <button
      type="button"
      buttonType="primary"
      (click)="applyCredentials()"
      appA11yTitle="{{ buttonLabel }}"
      bitButton
      [disabled]="!(buttonLabel && credentialValue)"
    >
      {{ buttonLabel }}
    </button>
  </ng-container>
</bit-dialog>
