<bit-dialog dialogSize="default" [title]="'createAccessToken' | i18n" [subtitle]="data.subTitle">
  <div bitDialogContent>
    <bit-callout type="info" [title]="'accessTokenCallOutTitle' | i18n">
      {{ "downloadAccessToken" | i18n }}<br />
      {{ "expiresOnAccessToken" | i18n }}
      {{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date: "medium") }}
    </bit-callout>

    <bit-form-field class="tw-mb-0">
      <bit-label>{{ "accessToken" | i18n }}</bit-label>
      <textarea bitInput readonly rows="4">{{ data.accessToken }}</textarea>
    </bit-form-field>
    {{ "expiresOnAccessToken" | i18n }}
    {{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date: "medium") }}
  </div>

  <ng-container bitDialogFooter>
    <button
      type="button"
      bitButton
      buttonType="primary"
      (click)="copyAccessToken()"
      startIcon="bwi-clone"
    >
      {{ "copyToken" | i18n }}
    </button>
  </ng-container>
</bit-dialog>
