.fr-mb-4w.attachment-multiple = template - each_attachment do |attachment, index| %div{ id: dom_id(attachment) } = render Attachment::EditComponent.new(champ:, attached_file:, attachment:, id:, index:, as_multiple: true) %div{ id: empty_component_id, class: class_names("hidden": !can_attach_next?) } = render Attachment::EditComponent.new(champ:, attached_file:, attachment: nil, id:, index: attachments_count) // single poll and refresh message for all attachments - if in_progress? %div{ data: poll_controller_options } - if in_progress_long? = render "attachments/pending_refresh", url: auto_attach_url