<app-page-header i18n-title title="Search results">
</app-page-header>

<div *ngIf="errorMessage" class="alert alert-danger" i18n>Invalid search query: {{errorMessage}}</div>

<p *ngIf="more_like" i18n>
    Showing documents similar to <a routerLink="/documents/{{more_like}}">{{more_like_doc?.original_file_name}}</a>
</p>

<p *ngIf="query">
    <ng-container i18n>Search query: <i>{{query}}</i></ng-container>
    <ng-container *ngIf="correctedQuery">
        - <ng-container i18n>Did you mean "<a [routerLink]="" (click)="searchCorrectedQuery()">{{correctedQuery}}</a>"?</ng-container>
    </ng-container>
</p>

<div *ngIf="!errorMessage" [class.result-content-searching]="searching" infiniteScroll (scrolled)="onScroll()">
    <p i18n>{resultCount, plural, =0 {No results} =1 {One result} other {{{resultCount}} results}}</p>
    <app-document-card-large *ngFor="let result of results"
        [document]="result.document"
        [details]="result.highlights"
        [searchScore]="result.score / maxScore"
        [moreLikeThis]="true">

</app-document-card-large>
</div>
