% content_for :title, t(".bulk_upload", tail_number: @aircraft.tail_number) %>
<%= render "shared/aircraft_header", aircraft: @aircraft %>
<% file_classes = "block w-full text-sm text-slate-600 file:mr-3 file:rounded-md file:border-0 file:bg-slate-100 file:px-3 file:py-1.5 file:text-sm file:font-medium hover:file:bg-slate-200" %>
<%= form_with url: bulk_aircraft_documents_path(@aircraft), multipart: true, class: "card card-body max-w-3xl space-y-4",
data: { controller: "bulk-upload", bulk_upload_url_value: rails_direct_uploads_path,
bulk_upload_max_bytes_value: UploadValidation.max_size, action: "submit->bulk-upload#submit" } do %>
<%= t(".bulk_upload_2") %>
<%= t(".each_file_becomes_its_own") %>
<% if @bulk_error %>
<%= @bulk_error %>
<% end %>
<%= label_tag :doc_type, t(".type"), class: "label" %>
<%= select_tag :doc_type, options_for_select(Document::TYPES.invert, @bulk[:doc_type]), class: "input" %>
<%= label_tag :visibility, t(".share_link_visibility"), class: "label" %>
<%= select_tag :visibility, options_for_select([ [ t(".inherit_from_collection"), "" ] ] + DocumentCollection::VISIBILITIES.invert.to_a, @bulk[:visibility]), class: "input" %>
<%= label_tag :document_collection_id, t(".collection"), class: "label" %>
<%= select_tag :document_collection_id,
options_for_select([ [ t(".none"), "" ] ] + @aircraft.document_collections.ordered.map { [ _1.name, _1.id ] }, @bulk[:document_collection_id]), class: "input" %>
<%= label_tag :new_collection, t(".or_a_new_collection"), class: "label" %>
<%= text_field_tag :new_collection, @bulk[:new_collection], class: "input", placeholder: t(".e_g_2025_annual") %>
<%= t(".images_pdfs_or_text_up_html", max_upload_mb: Setting.max_upload_mb, max_files: (DocumentsController::MAX_BULK_FILES)) %>
<%= link_to t(".cancel"), aircraft_documents_path(@aircraft), class: "btn-secondary" %>
<% end %>