{#
 # For the full copyright and license information, please view the
 # docs/licenses/LICENSE.txt file that was distributed with this source code.
 #}
<form id="header_search" class="component bo_search_form" method="post" action="{{ legacy_path('AdminSearch') }}" role="search">
  <input type="hidden" name="bo_search_type" id="bo_search_type" class="js-search-type" />
  {% if showClearBtn is defined and showClearBtn %}
    <a href="#" class="clear_search hide"><i class="icon-remove"></i></a>
  {% endif %}
  <div class="form-group">
    <input type="hidden" name="bo_search_type" id="bo_search_type" />
    <div class="input-group">
      <div class="input-group-btn">
        <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
          <i id="search_type_icon" class="material-icons">search</i>
        </button>
        <ul id="header_search_options" class="dropdown-menu">
          <li class="search-all search-option active">
            <a href="#" data-value="0" data-placeholder="{{ 'What are you looking for?'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">search</i> {{ 'Everywhere'|trans({}, 'Admin.Navigation.Header') }}</a>
          </li>
          <li class="divider"></li>
          <li class="search-book search-option">
            <a href="#" data-value="1" data-placeholder="{{ 'Product name, SKU, reference...'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">store_mall_directory</i> {{ 'Catalog'|trans({}, 'Admin.Navigation.Menu') }}
            </a>
          </li>
          <li class="search-customers-name search-option">
            <a href="#" data-value="2" data-placeholder="{{ 'Email, name...'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">group</i> {{ 'Customers by name'|trans({}, 'Admin.Navigation.Header') }}
            </a>
          </li>
          <li class="search-customers-addresses search-option">
            <a href="#" data-value="6" data-placeholder="{{ '123.45.67.89'|trans({}, 'Admin.Navigation.Header') }}" data-icon="icon-desktop">
              <i class="material-icons">desktop_mac</i> {{ 'Customers by IP address'|trans({}, 'Admin.Navigation.Header') }}</a>
          </li>
          <li class="search-orders search-option">
            <a href="#" data-value="3" data-placeholder="{{ 'Order ID'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">shopping_basket</i> {{ 'Orders'|trans({}, 'Admin.Global') }}
            </a>
          </li>
          <li class="search-invoices search-option">
            <a href="#" data-value="4" data-placeholder="{{ 'Invoice Number'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">book</i> {{ 'Invoices'|trans({}, 'Admin.Navigation.Menu') }}
            </a>
          </li>
          <li class="search-carts search-option">
            <a href="#" data-value="5" data-placeholder="{{ 'Cart ID'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">shopping_cart</i> {{ 'Carts'|trans({}, 'Admin.Global') }}
            </a>
          </li>
          <li class="search-modules search-option">
            <a href="#" data-value="7" data-placeholder="{{ 'Module name'|trans({}, 'Admin.Navigation.Header') }}">
              <i class="material-icons">extension</i> {{ 'Modules'|trans({}, 'Admin.Global') }}
            </a>
          </li>
        </ul>
      </div>
      {% if showClearBtn is defined and showClearBtn %}
      <a href="#" class="clear_search hide"><i class="material-icons">clear</i></a>
      {% endif %}
      <input id="bo_query" name="bo_query" type="text" class="form-control" value="{{ boQuery }}" placeholder="{{ 'Search'|trans({}, 'Admin.Actions') }}" aria-label="{{ 'Search'|trans({}, 'Admin.Actions') }}" />
    </div>
  </div>
  <script>
    {% if searchType is defined and searchType %}
    $(function() {
      $('.search-option a[data-value=' + {{ searchType ? 1 : 0 }} + ']').click();
    });
    {% endif %}
  </script>
</form>
