<%= product_wordmark :deliver_me, class: "small mb-3" %>

<div class="d-flex flex-row-reverse justify-content-between align-items-center mb-3">
  <%= bootstrap_form_with url: [@project, :videos], method: :get, remote: true, layout: :inline, id: "search" do |form| %>
    <%= form.search_field :query, hide_label: true, placeholder: t("shared.search"), class: "rounded-pill-right", value: params[:query], prepend: form.button(fa_icon("search"), id: "search-button", class: "btn btn-light border rounded-pill-left") %>
  <% end %>
  <% if policy(Video).new? %>
    <%= link_to fa_icon("plus", text: t(".actions.new")), [:landing, @project, :videos], class: "btn btn-primary" %>
  <% end %>
</div>

<div class="border bg-white rounded shadow-sm pb-3 table-responsive">
  <table class="table table-striped tr-px-4 align-all-middle">
    <thead class="thead-light">
      <tr>
        <th><%= t(".table_headers.upload_date") %></th>
        <th><%= Video.human_attribute_name(:name) %></th>
        <th><%= Video.human_attribute_name(:number) %></th>
        <th><%= t(".table_headers.file") %></th>
        <th><%= t(".table_headers.reports") %></th>
        <th></th>
      </tr>
    </thead>
    <tbody id="videos">
      <% if @videos.any? %>
        <%= render @videos %>
      <% else %>
        <tr>
          <td colspan="6" class="py-4 text-center text-muted"><%= t(".empty") %></td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>

<div id="videos_pagination" class="my-3">
  <%= will_paginate @videos %>
</div>

<p class="text-center"><%= t(".turnaround_time_message") %></p>
