<bit-dialog #dialog dialogSize="large" background="alt">
  <span bitDialogTitle>{{ "generator" | i18n }}</span>
  <ng-container bitDialogContent>
    <vault-cipher-form-generator
      [type]="data.type"
      (valueGenerated)="onCredentialGenerated($event)"
      [onAlgorithmSelected]="onAlgorithmSelected"
    />
    <bit-item>
      <button
        type="button"
        bitLink
        linkType="primary"
        bit-item-content
        aria-haspopup="true"
        (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
      bitDialogClose
      [disabled]="!(buttonLabel && credentialValue)"
    >
      {{ buttonLabel }}
    </button>
  </ng-container>
</bit-dialog>
