<div class="{{if hosts 'dash-widget__list'}} {{if isShowingAll 'dash-widget__list--expanded'}}" data-test-selector="host-list">
  {{#if hosts}}
    {{#each hosts as |host|}}
      {{dashboards/live/host-mode/host-details
        channel=channel
        host=host
        trackingSource=trackingSource
        added=(get autohost.listMap host.name)
        shouldShowAutohostAdd=isChannelOwner}}
    {{/each}}
  {{else}}
    {{emptyMessage}}
  {{/if}}
</div>

{{#if (gt hosts.length 4)}}
  <div class="dash-widget__divider mg-b-1"></div>
  <div class="dash-widget__item center mg-b-0">
    <button {{action 'toggleShowingAll'}} class="button button--text full-width" data-test-selector="toggle-showing-hosts">
      {{#if isShowingAll}}
        {{i18n 'Show fewer'}}
      {{else}}
        {{i18n 'Show all'}} ({{hosts.length}})
      {{/if}}
    </button>
  </div>
{{/if}}
