{% extends 'core_main_app/_render/admin/theme/tools/modal.html' %}

{% block modal_id %}semantic-search-settings-modal{% endblock %}
{% block modal_title %}<h3>Settings</h3>{% endblock %}

{% block modal_body %}
<div class="container">
    <div class="d-flex">
    <div class="col-sm-4">
      <label title="{% if data.vector_function == "l2_distance"%}max_distance{%else%}min_score{%endif%}">
          {% if data.vector_function == "l2_distance"%}Max. {%else%} Min. {%endif%}{{data.vector_function_display}}:</label>
    </div>
    <div class="col-sm-8">
            <input type="range"
                   class="form-range-sm w-25"
                   min="0"
                   max="1"
                   step="0.01"
                   value="0.4"
                   id="sem_settings_threshold"
                   oninput="sem_settings_threshold_output.value=this.value">
              <output id="sem_settings_threshold_output"
                      for="sem_settings_threshold"
                      name="threshold"
              >0.4</output>
        </div>
    </div>
    <div class="d-flex">
    <div class="col-sm-4">
      <label title="top_k">Sample Size:</label>
    </div>
        <div class="col-sm-8">
            <input type="range"
                   class="form-range-sm w-25"
                   min="1"
                   max="100"
                   step="1"
                   value="10"
                   id="sem_settings_top_k"
                   oninput="sem_settings_top_k_output.value=this.value">
              <output id="sem_settings_top_k_output"
                      for="sem_settings_top_k"
                      name="top_k"
              >10</output>
        </div>
    </div>
</div>
{% endblock %}
{% block modal_footer %}
<a class="btn btn-secondary" {% if BOOTSTRAP_VERSION|first == "4" %}data-dismiss{% elif BOOTSTRAP_VERSION|first == "5"  %}data-bs-dismiss{% endif %}="modal" href="#">
    <i class="fas fa-times"></i> Close
</a>
{% endblock %}