<%= content_tag :div, class: "modal modal-right", id: "new_audio_confirmation_modal", aria: { labelledby: "modalLabel", hidden: true }, role: "dialog", tabindex: -1 do %>
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="modalLabel">Confirm Audio</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <%= bootstrap_form_with model: [audio_confirmation.video, "video_analyses", audio_confirmation], layout: :horizontal, label_col: "col-3", control_col: "col-9" do |form| %>
        <div class="modal-body">

          <%= render "video_analyses/show_hide_edl_events", edl_events_data: @edl_events_data, model_name: "audio_confirmation" %>

          <div id="audio_confirmation_fields">
            <%= form.hidden_field :time_elapsed, value: audio_confirmation.time_elapsed %>
            <%= form.hidden_field :confirmation_type, value: audio_confirmation.confirmation_type %>
            <%= form.hidden_field :composer_info, value: audio_confirmation.composer_info %>
            <%= form.hidden_field :publisher_info, value: audio_confirmation.publisher_info %>
            <%= form.hidden_field :catalog, value: audio_confirmation.catalog %>
            <%= form.static_control nil, name: nil, label: "Source EDL", value: audio_confirmation.edl_type.to_s.titleize %>
            <%= form.static_control nil, name: nil, label: "Origin", value: audio_confirmation.confirmation_type.to_s.titleize %>
            <%= form.static_control nil, name: nil, label: "Video Timecode", value: audio_confirmation.appears_at %>
            <%= form.static_control nil, name: nil, label: "Composer", value: audio_confirmation.composer_info %>
            <%= form.static_control nil, name: nil, label: "Publisher", value: audio_confirmation.publisher_info %>
            <%= form.static_control nil, name: nil, label: "Catalog", value: audio_confirmation.catalog %>
            <%= form.text_area nil, name: nil, label: "Matched Filename", value: matched_file_name, id: "matched_file_name", readonly: true if matched_file_name.present? %>
            <%= form.select :music_type, ["Instrumental", "Vocal"] %>
            <%= form.select :music_category, ["Background", "Feature", "Theme"] %>
            <%= form.text_field :title %>
            <%= form.text_field :channel %>
            <%= form.text_field :timecode_in %>
            <%= form.text_field :timecode_out %>
            <%= form.text_field :duration %>
            <%= form.text_field :source_file_name %>
            <%= form.text_field :clip_name %>
            <%= form.text_field :description %>
          </div>
        </div>
        <div class="modal-footer">
          <%= form.button "Close", class: "btn btn-secondary", data: { dismiss: "modal" } %>
          <%= form.submit "Confirm Audio", class: "btn btn-primary", data: { disable_with: t("shared.disable_with") } %>
        </div>
      <% end %>
    </div>
  </div>
<% end %>
