<% provide(:head_title, t("experiments.module_archive.head_title", experiment: h(@experiment.name)).html_safe) %>
<% provide(:sidebar_title, t("sidebar.my_modules.sidebar_title_archived")) %>
<% provide(:sidebar_url, sidebar_experiment_path(@experiment)) %>
<% provide(:container_class, 'no-second-nav-container') %>
<%= content_for :sidebar do %>
  <%= render partial: 'shared/sidebar/archived_my_modules', locals: { experiment: @experiment, my_modules: @my_modules } %>
<% end %>
<div class="content-pane flexible" id="module-archive">
  <%= render partial: 'experiments/show_header' %>
  <div class="toolbar">
    <% if @my_modules.present? %>
    <%= render partial: 'task_view_dropdowns' %>
    </div>
    <div class="row mt-4"
         id="cards-container"
         data-move-modules-modal-url="<%= move_modules_modal_experiment_path(@experiment) %>"
         data-move-modules-url="<%= move_modules_experiment_path(@experiment) %>"
         >
      <% @my_modules.each_with_index do |my_module, i| %>
        <div class="module-container col-lg-4 col-md-5 col-sm-12">
          <%= render partial: 'canvas/full_zoom/my_module', locals: {experiment: @experiment, my_module: my_module} %>
        </div>
      <% end %>
    </div>
  <% end %>
  <!-- Manage tags modal -->
  <%= render partial: 'my_modules/modals/manage_module_tags_modal', locals: { my_module: nil } %>
  <% unless  @my_modules.present? %>
    <%= render partial: 'task_view_dropdowns' %>
  <% end %>
  <div id="actionToolbar" data-behaviour="vue">
    <action-toolbar actions-url="<%= actions_toolbar_my_modules_url %>" />
  </div>

  <div id="accessModalContainer" class="vue-access-modal">
    <div ref="accessModal" id="accessModalComponent"></div>
    <teleport to="body">
      <access-modal
        v-if="accessModalOpen"
        :params="params"
        @close="accessModalOpen = false" />
    </teleport>
  </div>
</div>
<% unless  @my_modules.present? %>
  <div class="pt-10">
    <em><%= t('experiments.empty_state.no_archived_modules') %></em>
  </div>
<% end %>
<%= javascript_include_tag('vue_components_action_toolbar') %>
<%= javascript_include_tag 'vue_legacy_access_modal' %>
<%= javascript_include_tag('projects/canvas') %>
<%= javascript_include_tag('my_modules/archived') %>
