<ds-pagination
  [paginationOptions]="config"
  [collectionSize]="objects?.payload?.totalElements"
  [sortOptions]="sortConfig"
  [hideGear]="hideGear"
  [objects]="objects"
  [hidePagerWhenSinglePage]="hidePagerWhenSinglePage"
  [hidePaginationDetail]="hidePaginationDetail"
  [showPaginator]="showPaginator"
  (pageChange)="onPageChange($event)"
  (pageSizeChange)="onPageSizeChange($event)"
  (sortDirectionChange)="onSortDirectionChange($event)"
  (sortFieldChange)="onSortFieldChange($event)"
  (paginationChange)="onPaginationChange($event)"
  (prev)="goPrev()"
  (next)="goNext()"
  >
  @if (objects?.hasSucceeded) {
    <div class="card-columns row">
      @for (column of (columns$ | async); track column) {
        <div class="card-column col col-sm-6 col-lg-4" @fadeIn>
          @for (object of column; track object) {
            <div class="card-element" [attr.data-test]="'grid-object' | dsBrowserOnly">
              <ds-listable-object-component-loader [object]="object"
                [viewMode]="viewMode"
                [context]="context"
                [showThumbnails]="showThumbnails"
              [linkType]="linkType"></ds-listable-object-component-loader>
            </div>
          }
        </div>
      }
    </div>
  }
  @if (objects.hasFailed) {
    <ds-error message="{{'error.objects' | translate}}"></ds-error>
  }
  @if (objects.isLoading) {
    <ds-loading message="{{'loading.objects' | translate}}"></ds-loading>
  }
</ds-pagination>


