{#
  Copyright (C) 2020-2023 Graz University of Technology.

  invenio-theme-iform is free software; you can redistribute it and/or
  modify it under the terms of the MIT License; see LICENSE file for more
  details.
#}

{% set options = [
  {
    "key": "records",
    "text": _("All"),
    "value": url_for("invenio_search_ui.search"),
    "title": "repo",
  },{
    "key": "rdm",
    "text": _("Research Results"),
    "value": "/records/search",
    "title": "Research Data",
  },{
    "key": "marc21",
    "text": _("Publications"),
    "value": url_for("invenio_records_marc21.search"),
    "title": "publication",
  },{
    "key": "lom",
    "text": _("Educational Resources"),
    "value": url_for("invenio_records_lom.search"),
    "title": "oer",
  }
]
%}

<div class="ui container">
  <div class="short-menu" id="all-menu-top-table">
    <div class="short-menu-left">
      <div id="all-menu-top-left-item">
        <div class="short-menu-left-search">
          <div style="display: inline-block;">
            <div class="item p-0 search-bar rel-mr-1">
              <div id="header-search-bar" data-options='{{ options | tojson }}'></div>
            </div>
          </div>

          <div class="short-menu-left-lang">
            {%- for l in current_i18n.get_locales() %}
              {%- if current_i18n.language != l.language %}
                <a href="{{ url_for("invenio_i18n.set_lang", lang_code=l.language) }}"
                   class="no-decoration">
                  {{ l.get_display_name().upper()[0:2] }}
                </a>
              {%- endif %}
            {%- endfor %}
          </div>
        </div>
      </div>
    </div>

    <div class="short-menu-right">
      {%- block navbar_right %}
        {%- include config.THEME_HEADER_LOGIN_TEMPLATE %}
      {%- endblock navbar_right %}
    </div>
  </div>


  <!----END MENU------------------------------------------------------------->

  <div class="ui grid" id="main-logo">
    <!-- Left -->
    <div class="left floated left aligned six wide column" id="repo-logo">
      <div class="inline-elements">
        <div class="repo-img">
          <img height="51.862" src="{{ url_for("static", filename="images/library_logo.png")}}">
        </div>
        <div class="affiliation-text">
          <a title="Home" href="{{url_for("invenio_theme_iform.index")}}" class="no-decoration">
            {{ _("I-FORM") }}
            <br>
            {{ _("REPOSITORY") }}
            <br>
            {{ _("LIBRARY & ARCHIVES") }}
          </a>
        </div>
      </div>
    </div>
    <!-- Right -->
    <div class="right floated right aligned six wide column">
      <div class="affiliation-logo" id="int-header-logo">
        <a href="https://www.i-form.ie" title="I-Form Home" target="_blank" class="no-decoration">
          <div class="affiliation-logo-claim">
            <div class="affiliation-logo-claim-single">{{ _("SCIENCE") }}</div>
            <div class="affiliation-logo-claim-single">{{ _("PASSION") }}</div>
            <div class="affiliation-logo-claim-single">{{ _("TECHNOLOGY") }}</div>
          </div>
          {%- include "invenio_theme_iform/iform_logo.svg" %}
        </a>
      </div>
    </div>
  </div>
</div>
