<%= render(Spina::UserInterface::ModalComponent.new(size: "max-w-6xl h-full")) do |component| %>
<%= render Spina::MediaPicker::ImageComponent.with_collection(@images) %>
<% if @images.next_page %> <%= link_to "Load more images", helpers.path_to_next_page(@images), class: "btn btn-default mt-6", data: {infinite_scroll_target: "button"} %> <% end %>
<%= form_with method: :get, url: helpers.spina.admin_media_picker_path, data: {controller: "form", turbo_frame: "images"} do |f| %> <%= f.hidden_field :media_folder_id, value: @media_folder&.id %> <%= render Spina::Forms::SearchComponent.new(f, :query) %> <% end %>
<% end %>