{% load i18n %}

{% url "search" as search_url %}
{% trans "Search maps" as default_placeholder %}
<div class="wrapper search_wrapper">
  <div class="row">
    <form class="search-form flex-break" action="{% firstof action search_url %}" method="get">
      <input name="q"
             type="search"
             placeholder="{% firstof placeholder default_placeholder %}"
             aria-label="{% firstof placeholder default_placeholder %}"
             value="{{ request.GET.q|default:"" }}" />
      <select name="tags">
        <option value="">{% trans "Any category" %}</option>
        {% for value, label in UMAP_TAGS %}
        <option value="{{ value }}" {% if request.GET.tags == value %}selected{% endif %}>{{ label }}</option>
        {% endfor %}
      </select>
      <input type="submit" value="{% trans "Search" %}" />
    </form>
  </div>
</div>
