<paginate
  ng-if="sortedRows.length"
  list="sortedRows"
  per-page-prop="perPage"
  class="agg-table">
  <div class="agg-table-paginated">
    <table class="table table-condensed">
      <thead data-test-subj="paginated-table-header">
        <tr>
          <th
            ng-repeat="col in columns"
            ng-click="paginatedTable.sortColumn($index)"
            kbn-accessible-click
            tabindex="0"
            class="{{ col.class }}">
            <span ng-bind="::col.title"></span>
            <kbn-info ng-if="col.info" info="{{ col.info }}" placement="top"></kbn-info>
            <i
              ng-if="col.sortable !== false"
              class="fa"
              ng-class="{
                'fa-sort-asc': paginatedTable.sort.columnIndex === $index && paginatedTable.sort.direction === 'asc',
                'fa-sort-desc': paginatedTable.sort.columnIndex === $index && paginatedTable.sort.direction === 'desc',
                'fa-sort': paginatedTable.sort.columnIndex !== $index || paginatedTable.sort.direction === null
              }">
            </i>
          </th>
        </tr>
      </thead>
      <tbody
        data-test-subj="paginated-table-body"
        kbn-rows="page"
        kbn-rows-min="paginatedTable.rowsToShow(perPage, page.length)"
      >
      </tbody>
      <tfoot ng-if="showTotal">
        <tr>
          <th ng-repeat="col in columns" class="numeric-value">{{col.total}}</th>
        </tr>
      </tfoot>
    </table>
  </div>

  <!-- auto-inserted by the paginate directive... -->
  <!-- <paginate-controls></paginate-controls> -->
  <div class="pagination-container" ng-transclude></div>
</paginate>
