<ng-container *ngIf="componentContext$ | async as ctx">
    <div>
        <div
            [attr.help-mode-key]="'document_in_editor'"
            [class.error]="file.isError"
            [class.initial-processing]="file.isInitialProcessing || (ctx.ocrByDefault && !file.lastOCRTime)"
            [matTooltip]="file.filename"
            class="table-item-title"
            matTooltipPosition="above"
        >
            {{ file.filename }}
        </div>
    </div>

    <div *ngIf="ctx.primaryAttribute" class="primary-attribute">
        <div class="small-label" *ngIf="file?.softDeletedTime; else editableFileAttribute">
            <div>
                <span [matTooltip]="ctx.primaryAttribute.label" matTooltipPosition="above">
                    {{ ctx.primaryAttribute.label }}
                </span>
            </div>
        </div>
        <ng-template #editableFileAttribute>
            <redaction-file-attribute
                [file]="defaultFile"
                [dossier]="dossier"
                [fileAttribute]="ctx.primaryAttribute"
                [fileNameColumn]="true"
            ></redaction-file-attribute>
        </ng-template>
    </div>

    <redaction-file-stats [file]="file"></redaction-file-stats>
</ng-container>
