<%# locals: ()  %>

<section class="multiform-page">
  <h3><%= t('scripts.admin.checkup.title') %></h3>

  <p><%= it('scripts.admin.checkup.intro', site_name:, rules_link: help_code_rules_path) %></p>

  <ul class="checkup-list">
    <% has_license = @script.license.present? %>
    <li class="<%= 'good-check' if has_license %>"><%= it('scripts.admin.checkup.license_html', license_link: help_meta_keys_path(anchor: 'meta-license')) %></li>

    <% non_domain_applies_tos = @script.script_applies_tos.reject(&:domain?) %>
    <li class="<%= 'good-check' if non_domain_applies_tos.none? %>">

      <%= it('scripts.admin.checkup.globs_html', include_link: help_meta_keys_path(anchor: 'meta-include'), match_link: help_meta_keys_path(anchor: 'meta-include'), site_name:) %>
      <% if non_domain_applies_tos.any? %>
        <%= t('scripts.admin.checkup.globs_used_html', globs: safe_join(non_domain_applies_tos.map(&:site_application).map(&:text).map {|t| content_tag(:code, t) }, ', ')) %>
      <% end %>
    </li>

    <% has_additional_info = @script.localized_additional_infos.any? %>
    <li class="<%= 'good-check' if has_additional_info %>">
      <%= t('scripts.admin.checkup.additional_info') %>
    </li>
  </ul>
</section>
