<div [id]="getObjectId()"
     class="form-group">
    <label [ngbTooltip]="tooltip | emptyIfNull"
           [hidden]="!label" class="control-label">
        <span>{{label}}<span *ngIf="isRequired()" class="alarm"> *</span></span>
    </label>
    <div class="component-float file-upload">
        <input class="form-control file-name"
               [name]="name"
               type="text"
               [readonly]="true"
               [title]="getValueForTooltip()"
               [placeholder]="getPlaceholder() | emptyIfNull"
               (focus)="onFocus()"
               (blur)="onBlur()"
               (drop)="onDrop($event)"
               (dragover)="onDragOver($event)">
        <input class="file" type="file" hidden
               [multiple]="maxFilesToUpload < 1 ? null : 'multiple' "
               [accept]="getExtensions()"
               (change)="onFileChanged()">
        <div class="file-btn">
            <button type="button" class="btn btn-default choose-file-btn" title="Загрузить"
                    [disabled]="!isEnabled()"
                    (click)="openFileChooseDialog()"></button>
        </div>
        <div *ngIf="getCustomValidationMessages().size > 0 || warningMessages.length > 0" class="msg" [ngStyle]="errorTooltipStyle">
            <div class="arrow"></div>
            <div class="control-label">
                <div class="msg-alert"
                     *ngFor="let warning of warningMessages">
                    {{warning}}
                </div>
            </div>
            <div class="control-label">
                <div class="msg-alert"
                     *ngFor="let customValidationMessage of getCustomValidationMessages()">
                    {{customValidationMessage}}
                </div>
            </div>
        </div>
    </div>
</div>
<file-preview page-object
              [files]="getValue()"
              [canDelete]="canDelete"
              (onDeleteFile)="deleteFileFunction($event)"
              [previewDisplayType]="previewDisplayType">
</file-preview>
