<h1 mat-dialog-title>{{data.username}}</h1>
<mat-dialog-content>
    <h3>{{'permissions' | i18n}}</h3>
    <app-permissions [permissions]="data.permissions"></app-permissions>
    <h3>{{'quotas' | i18n}}</h3>
    <app-quotas [quotas]="data.quotas"></app-quotas>
    <h3>{{'pgp.privateKey' | i18n}}</h3>
    <mat-form-field>
        <qrcode [qrdata]="data.privateKey" [width]="400" [errorCorrectionLevel]="'M'"></qrcode>
        <mat-label>{{'pgp.privateKey' | i18n}}</mat-label>
        <textarea matInput readonly [(ngModel)]="data.privateKey"></textarea>
    </mat-form-field>
</mat-dialog-content>
<mat-dialog-actions>
    <a mat-raised-button color="primary" #downloadKey (click)="setDownloaded()">{{'pgp.privateKey.downloadKey' |
        i18n}}</a>
    <button mat-icon-button [matTooltip]="'pgp.privateKey.help' | i18n" matTooltipPosition="after">
        <mat-icon>help</mat-icon>
    </button>
</mat-dialog-actions>
<br />
<mat-dialog-actions>
    <mat-slide-toggle [(ngModel)]="data.confirmClose" [disabled]="!downloaded">
        {{'pgp.privateKey.confirmStore' | i18n}}
    </mat-slide-toggle>

    <button mat-button [disabled]="!data.confirmClose" [mat-dialog-close]="true">{{'ok' | i18n}}</button>
</mat-dialog-actions>