% content_for :title, t(".ad_import_preview") %>
<%= render "shared/aircraft_header", aircraft: @aircraft %>
<% rows = @import.rows %>
<%= form_with url: confirm_aircraft_ad_import_path(@aircraft), class: "space-y-5" do |f| %>
<%= hidden_field_tag :token, @token %>
<%= hidden_field_tag :filename, @filename %>
<%= t(".this_file_has_no_links_html") %> <%= t(".choose_what_to_do_with_html", model: (@aircraft.model.presence || t(".not_set"))) %><%= t(".preview_html", filename: @filename) %>
<%= t(".found_with_drs_links_html", rows: (t("counts.ad", count: rows.size)), url: (rows.count(&:url))) %>
<% rows.each do |r| %>
<%= t(".ad") %> <%= t(".subject") %> <%= t(".effective") %> <%= t(".notes") %> <%= t(".action") %>
<% end %>
<%= r.number %><%= link_to " 🔗", r.url, target: "_blank", rel: "noopener noreferrer", title: t(".link_found_in_file") if r.url %>
<% if r.product_type %>
<%= r.subject %>
<% if r.summary %>
<%= t(".summary") %>
<%= r.summary %><%= fmt_date(r.effective_date) %>
<% r.notes.each do |n| %>
<% choices = r.tracked ? [ [ t(".update"), "track" ], [ t(".not_applicable"), "na" ], [ t(".skip_leave_as_is"), "skip" ] ] : AdImport::ACTIONS.invert %>
<%= select_tag "decisions[#{r.number}]", options_for_select(choices, r.suggested), class: "input" %>