{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
~}}

{{#if (or (and @items.meta @items.meta.total) @items.length)}}
  <div class="box is-fullwidth is-bottomless is-sideless is-paddingless" data-test-list-view-list>
    {{#each @items as |item|}}
      {{yield (hash item=item)}}
    {{else}}
      {{yield}}
    {{/each}}
    {{#if @paginationRouteName}}
      <Hds::Pagination::Numbered
        @currentPage={{@items.meta.currentPage}}
        @currentPageSize={{@items.meta.pageSize}}
        @route={{@paginationRouteName}}
        @models={{@paginationRouteParams}}
        @showSizeSelector={{false}}
        @totalItems={{@items.meta.total}}
        @queryFunction={{this.paginationQueryParams}}
      />
    {{/if}}
  </div>
{{else}}
  {{yield (hash empty=(component "empty-state" title=this.emptyTitle message=this.emptyMessage))}}
{{/if}}