<div class="content-container" iqserHasScrollbar>
    <div class="dialog">
        <div class="dialog-header">
            <div [translate]="'entity.info.heading'" class="heading-l"></div>

            <div *ngIf="!permissionsService.canEditEntities()" class="read-only-indicator all-caps-label primary">
                <mat-icon class="mr-8" svgIcon="red:read-only"></mat-icon>
                {{ 'readonly' | translate }}
            </div>
        </div>

        <div class="dialog-content">
            <redaction-add-edit-entity
                [dossierTemplateId]="dossierTemplateId"
                [entity]="entity$ | async"
                [readOnly]="!permissionsService.canEditEntities()"
            ></redaction-add-edit-entity>
        </div>

        <div *ngIf="permissionsService.canEditEntities()" class="dialog-actions">
            <iqser-icon-button
                (action)="save()"
                [disabled]="disabled"
                [label]="'entity.info.actions.save' | translate"
                [type]="iconButtonTypes.primary"
            ></iqser-icon-button>

            <div (click)="revert()" [translate]="'entity.info.actions.revert'" class="all-caps-label cancel"></div>

            <iqser-help-button *ngIf="!config.IS_DOCUMINE" [helpButtonKey]="'edit_delete_entities'"></iqser-help-button>
        </div>
    </div>
</div>
