<%= header %>

<% if enabled? %>
  <div class="callout primary experimental-feature">
    <strong><%= sanitize(t("admin.machine_learning.help_text")) %></strong>
  </div>

  <ul class="tabs" data-tabs id="machine_learning_tabs" data-deep-link="true">
    <li class="tabs-title is-active">
      <a href="#scripts">
        <%= t("admin.machine_learning.tab_scripts") %>
      </a>
    </li>
    <li class="tabs-title">
      <a href="#settings">
        <%= t("admin.machine_learning.tab_settings") %>
      </a>
    </li>
    <li class="tabs-title">
      <a href="#help">
        <%= t("admin.machine_learning.tab_help") %>
      </a>
    </li>
  </ul>

  <div class="tabs-content" data-tabs-content="machine_learning_tabs">
    <%= render Admin::MachineLearning::ScriptsComponent.new(machine_learning_job) %>
    <%= render Admin::MachineLearning::SettingsComponent.new %>
    <%= render Admin::MachineLearning::HelpComponent.new %>
  </div>
<% else %>
  <div class="callout primary">
    <p>
      <%= sanitize(t("admin.machine_learning.feature_disabled",
                     link: link_to(t("admin.machine_learning.feature_disabled_link"),
                                   admin_settings_path(anchor: "tab-feature-flags")))) %>
    </p>
  </div>
<% end %>
