{{#with (hash
          row=(or rowComponent (component "lt-row"))
          spanned-row=(or spannedRowComponent (component "lt-spanned-row"))
          infinity=(or infinityComponent (component "lt-infinity"))
        ) as |lt|
}}
  {{#if sharedOptions.occlusion}}
    <div class="lt-scrollable tse-scrollable vertical-collection">
      <div id={{concat tableId "_inline_head"}} class="lt-inline lt-head"></div>

      <table class={{tableClassNames}}>
        <tbody class="lt-body">
          {{#if overwrite}}
            {{yield columns rows}}
          {{else}}
            {{#vertical-collection
                rows
                tagName="vertical-collection"
                estimateHeight=sharedOptions.estimatedRowHeight
                shouldRecycle=sharedOptions.shouldRecycle
                bufferSize=scrollBufferRows
                containerSelector=".lt-scrollable"
                firstVisibleChanged=(action "firstVisibleChanged")
                lastVisibleChanged=(action "lastVisibleChanged")
                firstReached=(action "firstReached")
                lastReached=(action "lastReached")
               as |row|
            }}
              {{lt.row row columns
                       data-row-id=row.rowId
                       table=table
                       tableActions=tableActions
                       extra=extra
                       enableScaffolding=enableScaffolding
                       canExpand=canExpand
                       canSelect=canSelect
                       click=(action "onRowClick" row)
                       doubleClick=(action "onRowDoubleClick" row)}}
            {{/vertical-collection}}
            {{yield (hash
                      loader=(component lt.spanned-row classes="lt-is-loading")
                      no-data=(component lt.spanned-row classes="lt-no-data")
                      expanded-row=(component lt.spanned-row visible=false)
                    ) rows}}
          {{/if}}
        </tbody>
      </table>

      <div id={{concat tableId "_inline_foot"}} class="lt-inline lt-foot"></div>
    </div>
  {{else}}
    {{#lt-scrollable
      tagName=""
      virtualScrollbar=useVirtualScrollbar
      autoHide=autoHideScrollbar
      scrollTo=targetScrollOffset
      onScrollY=(action "onScroll")
      as |scrollbar|
    }}
      <div id={{concat tableId "_inline_head"}} class="lt-inline lt-head"></div>

      <table class={{tableClassNames}}>
        <tbody class="lt-body">
          {{#if enableScaffolding}}
            <tr class="lt-scaffolding-row">
              {{#each columns as |column|}}
                {{! template-lint-disable no-inline-styles }}
                <td style={{html-safe (if column.width (concat "width: " column.width))}} class="lt-scaffolding"></td>
                {{! template-lint-enable no-inline-styles }}
              {{/each}}
            </tr>
          {{/if}}

          {{#if overwrite}}
            {{yield columns rows}}
          {{else}}
            {{#each (if scrollbar (compute scrollbar.update rows) rows) as |row|}}
              {{lt.row row columns
                       data-row-id=row.rowId
                       table=table
                       tableActions=tableActions
                       extra=extra
                       enableScaffolding=enableScaffolding
                       canExpand=canExpand
                       canSelect=canSelect
                       click=(action "onRowClick" row)
                       doubleClick=(action "onRowDoubleClick" row)}}

              {{yield (hash
                        expanded-row=(component lt.spanned-row classes="lt-expanded-row" colspan=colspan yield=row visible=row.expanded)
                        loader=(component lt.spanned-row visible=false)
                        no-data=(component lt.spanned-row visible=false)
                      ) rows}}
            {{/each}}

            {{yield (hash
                      loader=(component lt.spanned-row classes="lt-is-loading" colspan=colspan)
                      no-data=(component lt.spanned-row classes="lt-no-data" colspan=colspan)
                      expanded-row=(component lt.spanned-row visible=false)
                    ) rows}}
          {{/if}}
        </tbody>
      </table>

      {{#if onScrolledToBottom}}
        {{lt.infinity
          enterViewport=(action "enterViewport")
          exitViewport=(action "exitViewport")
          scrollableContent=(concat "#" tableId " .lt-scrollable")}}
      {{/if}}

      <div id={{concat tableId "_inline_foot"}} class="lt-inline lt-foot"></div>
    {{/lt-scrollable}}
  {{/if}}
{{/with}}
