<div class='video item' data-content="{{video.id}}">
  <div class='content'>
    <div class='thumb'>
      <a href={{video.url}} class='cap aspect'>
        {{!-- scar notification --}}
        {{#if video.is_muted}}
          {{svg-icon iconModifier='scar alert' path='svg/muted'}}
        {{/if}}
        {{#svg-icon iconModifier='card__meta card__meta--left video-item__view-count' path='svg/glyph-views'}}
          {{commatized video.views}}
        {{/svg-icon}}
        {{!-- / append .all-overlays if expiration and youtube is both shown --}}
        <div class='info-overlay'>
          {{!-- only show deletion overlay when there is no appeal pending --}}
          {{#if appealPending}}
            <div class="overlay-content plain">
              <p>{{i18n 'Appeal in progress'}}</p>
            </div>
          {{else}}
            <div class="{{unless isExpiring "hide"}} expiration overlay-content">
              <p class='date'>
                {{deleteDate}}
              </p>
              <p class='desc'>
                {{i18n "until deletion"}}
              </p>
            </div>
          {{/if}}
        </div>
        <img class="aspect__fill" src={{video.preview.medium}}>
      </a>
    </div>
    <div class='meta'>
      <p class='title'>
        <a href={{video.url}}>
          <span>
            {{#if video.title}}
              {{video.rollbackData.title}}
            {{else}}
              {{i18n "Untitled"}}
            {{/if}}
          </span>
        </a>
      </p>
      <p class='info'>
        {{relative-time date=video.recordedDate}}
        &middot;
        {{#if video.isRecording}}
          {{i18n "Recording"}}
        {{else}}
          {{length-as-clock video.length}}
        {{/if}}
        &middot;
        {{commatized video.views}} {{i18n "Views"}}
      </p>
      <p class='info description'>
        {{#if video.description}}
          {{video.rollbackData.description}}
        {{else}}
          {{i18n "No description available"}}
        {{/if}}
      </p>
      <div class='actions'>
        <ul class='action-menu-list'>
          <li>
            {{#if isPastBroadcasts}}
              {{#link-to "manager.highlighter" video.id class="button button--text video-item__button"}}
                {{i18n "Highlight"}}
              {{/link-to}}
            {{else}}
              <a class='button button--text video-item__button'>
                {{edit-modal
                    content=video
                    template="shared/edit_video"
                    openInModal=(route-action "openInModal")
                    closeModal=(route-action "closeModal")
                }}
              </a>
            {{/if}}
          </li>
          {{manager/download-link videoId=(normalize-video-id video.id) tagName='li'}}
          <li>
            <a {{action "toggleDropmenu"}} class='button button--text button--dropmenu video-item__button video-item__button--dropmenu filter-toggle' data-test-filter-toggle>
              {{t 'general.common.more'}}
            </a>
          </li>
        </ul>

        <ul class="{{unless showDropdown 'hide'}} dropmenu menu-like" data-test-more-actions>
          {{#if isPastBroadcasts}}
            <li>
              <div class='edit_action' data-test-edit>
                {{edit-modal
                    content=video
                    template="shared/edit_video"
                    openInModal=(route-action "openInModal")
                    closeModal=(route-action "closeModal")
                }}
              </div>
            </li>
            {{#if manager.model.can_rebroadcast}}
              <li {{action "addToRebroadcastList" video target=manager}}>
                <div class='dropmenu_action'>
                  {{i18n "Rebroadcast"}}
                </div>
              </li>
            {{/if}}
          {{/if}}
          {{#if canAppeal}}
            <li>
              {{#if canAppealWithForm}}
                <div {{action 'showVodAppealsForm'}} class='dropmenu_action' data-test-appeal-button>
                  {{video/appeals/appeal-text vodId=video.id}}
                </div>
              {{else}}
                <a href={{appealHref}}>
                  <div class='dropmenu_action'>
                    {{i18n "Appeal"}}
                  </div>
                </a>
              {{/if}}
            </li>
          {{/if}}
          {{#if canExportVideos}}
            <li>
              {{! span is required for styling :( }}
              <span {{action "handleExport" video}} class='dropmenu_action' data-test-export-button>
                {{i18n 'Export'}}
              </span>
            </li>
          {{/if}}

          <li {{action (route-action "openInModal" "shared/delete_video" this)}} data-test-delete-video>
            <div class='dropmenu_action dropmenu-alert-text'>
              {{t 'general.forms.delete'}}
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</div>
