{{olv-toolbar
  class='ui secondary menu no-margin'
  createNewButton=createNewButton
  enableCreateNewButton=(not readonly)
  refreshButton=refreshButton
  deleteButton=deleteButton
  colsConfigButton=colsConfigButton
  advLimitButton=advLimitButton
  enableFilters=enableFilters
  exportExcelButton=exportExcelButton
  showFilters=_showFilters
  showFiltersInModal=showFiltersInModal
  filters=filters
  toggleStateFilters=(action "toggleStateFilters")
  resetFilters=(action "resetFilters" this.attrs.resetFilters)
  filterButton=filterButton
  filterText=filterText
  buttonClass=buttonClass
  enableDeleteButton=(not readonly)
  inLookup=(eq componentMode "lookupform")
  componentName=componentName
  lookupComponentName=lookupComponentName
  modelController=currentController
  customButtonAction='customButtonAction'
  customButtons=customButtons
  editFormRoute=editFormRoute
  showConfigDialog="showConfigDialog"
  showAdvLimitDialog="showConfigDialog"
  confirmDeleteRows=confirmDeleteRows
  inHierarchicalMode=inHierarchicalMode
  inExpandMode=inExpandMode
  availableHierarchicalMode=_availableHierarchicalMode
  availableCollExpandMode=availableCollExpandMode
  switchHierarchicalMode=(action "switchHierarchicalMode")
  switchExpandMode=(action "switchExpandMode")
  readonly=readonly
  isUseVoiceTyping=isUseVoiceTyping
}}
{{object-list-view
  placeholder=placeholder
  readonly=readonly
  columnsWidthAutoresize=columnsWidthAutoresize
  minAutoColumnWidth=minAutoColumnWidth
  buttonClass=buttonClass
  tableStriped=tableStriped
  customTableClass=customTableClass
  cellComponent=cellComponent
  singleColumnCellComponent=singleColumnCellComponent
  singleColumnHeaderTitle=singleColumnHeaderTitle
  createNewByPrototype=(action "createNewByPrototype")
  showValidationMessagesInRow=(and (not readonly) showValidationMessagesInRow)
  showAsteriskInRow=showAsteriskInRow
  showCheckBoxInRow=showCheckBoxInRow
  showEditButtonInRow=showEditButtonInRow
  showPrototypeButtonInRow=showPrototypeButtonInRow
  showDeleteButtonInRow=showDeleteButtonInRow
  showEditMenuItemInRow=showEditMenuItemInRow
  showPrototypeMenuItemInRow=showPrototypeMenuItemInRow
  showDeleteMenuItemInRow=showDeleteMenuItemInRow
  sendMenuItemAction=(action "sendMenuItemAction")
  menuInRowAdditionalItems=menuInRowAdditionalItems
  rowClickable=(and (not readonly) rowClickable)
  orderable=orderable
  sorting=sorting
  immediateDelete=true
  modelName=modelName
  modelProjection=modelProjection
  content=content
  sortByColumn=(action (if this.attrs.sortByColumn this.attrs.sortByColumn 'sortByColumn'))
  addColumnToSorting=(action (if this.attrs.addColumnToSorting this.attrs.addColumnToSorting 'addColumnToSorting'))
  enableFilters=enableFilters
  showFilters=_showFilters
  showFiltersInModal=showFiltersInModal
  filters=filters
  isUseVoiceTyping=isUseVoiceTyping
  applyFilters=(action (if applyFilters applyFilters "applyFilters"))
  componentForFilter=componentForFilter
  componentForFilterByCondition=componentForFilterByCondition
  conditionsByType=conditionsByType
  filterByAnyMatch=(action (if this.attrs.filterByAnyMatch this.attrs.filterByAnyMatch 'filterByAnyMatch'))
  filterByAnyWord=filterByAnyWord
  filterByAllWords=filterByAllWords
  filterProjectionName = filterProjectionName
  configurateRow=this.attrs.configurateRow
  configurateSelectedRows=this.attrs.configurateSelectedRows
  confirmDeleteRow=confirmDeleteRow
  beforeDeleteRecord=beforeDeleteRecord
  beforeDeleteAllRecords=beforeDeleteAllRecords
  action='objectListViewRowClick'
  componentName=componentName
  allowColumnResize=allowColumnResize
  selectedRecord=selectedRecord
  notUseUserSettings=notUseUserSettings
  isParentRecordPropertyName=isParentRecordPropertyName
  hierarchicalIndent=hierarchicalIndent
  inHierarchicalMode=inHierarchicalMode
  inExpandMode=inExpandMode
  disableHierarchicalMode=(if hierarchyByAttribute true disableHierarchicalMode)
  loadRecords=(action "loadRecords")
  availableHierarchicalMode=(action "availableHierarchicalMode")
  hierarchyAttribute=hierarchyAttribute
  useRowByRowLoading=useRowByRowLoading
  useRowByRowLoadingProgress=useRowByRowLoadingProgress
  eventsBus=eventsBus
  onEditForm=onEditForm
  customButtonInRowAction="customButtonInRowAction"
  customButtonsInRow=customButtonsInRow
  defaultSortingButton=defaultSortingButton
  defaultLeftPadding=defaultLeftPadding
  overflowedComponents=overflowedComponents
  fixedHeader=fixedHeader
}}
{{#if (or (not inHierarchicalMode) hierarchyPaging)}}
  <div class="ui secondary menu no-margin nav-bar">
    <div class="ui basic buttons">
      <button
        type="button"
        class="ui {{unless hasPreviousPage "disabled"}} button prev-page-button"
        disabled={{not hasPreviousPage}}
        {{action "previousPage" this.attrs.previousPage}}>
      </button>
      {{#each pages as |page|}}
        {{#if page.isEllipsis}}
          <div class="ui button">...</div>
        {{else if page.isCurrent}}
          <button type="button" class="ui disabled active button" disabled>{{page.number}}</button>
        {{else}}
          <button type="button" class="ui button" {{action "gotoPage" this.attrs.gotoPage page.number}}>{{page.number}}</button>
        {{/if}}
      {{/each}}
      <button
        type="button"
        class="ui {{unless hasNextPage "disabled"}} button next-page-button"
        disabled={{not hasNextPage}}
        {{action "nextPage" this.attrs.nextPage}}>
      </button>
    </div>
    <div class="ui input nav-bar-search-page {{if (and searchPageValue searchPageButtonReadonly) 'error' }}">
      {{input
        type="number"
        min=_pages.firstObject.number
        max=_pages.lastObject.number
        placeholder=(t "components.flexberry-objectlistview.search-page-placeholder")
        value=searchPageValue
        enter=(action 'searchPageButtonAction' this.attrs.gotoPage)
      }}
      {{!-- TODO: I still do not understand why, but without this, in the Ember 2.x version, the form submitting is faster than processing the `enter` event. --}}
      {{input classNames=(array "hidden")}}
      {{#if searchPageValue}}
        <button
          type="button"
          class="ui {{buttonClass}} icon button {{if searchPageButtonReadonly 'disabled' 'primary'}} goto-page-button small"
          title={{t "components.flexberry-objectlistview.search-button-text"}}
          disabled={{searchPageButtonReadonly}}
          {{action 'searchPageButtonAction' this.attrs.gotoPage}}>
        </button>
      {{/if}}
    </div>
    <div class="right menu">
      {{#if showShowingEntries}}
        <div class="showing-entries">
          {{#if (and currentIntervalRecords recordsTotalCount) }}
            {{concat
              (t "components.flexberry-objectlistview.showing-entries.showing") currentIntervalRecords (t "components.flexberry-objectlistview.showing-entries.of") recordsTotalCount (t "components.flexberry-objectlistview.showing-entries.entries")
            }}
          {{/if}}
        </div>
      {{/if}}
      {{flexberry-dropdown items=perPageValues value=perPageValue class="compact selection" onChange=(action "perPageClick") needChecksOnValue=false direction="upward"}}
    </div>
  </div>
{{/if}}