{% set searchWidgetOptions = {
searchWidgetMinChars: page.header.activeLanguage.productSearchConfig.minSearchLength ?: 3
} %}
{% block layout_header_search %}
<div class="header-search mb-2 mt-2 mb-md-4 mt-md-4">
<h2 class="search-header-question text-nowrap my-0">{{ "search.question"|trans }}</h2>
<button class="btn search-toggle-btn js-search-toggle-btn collapsed py-0 px-2 ml-auto"
type="button"
{{ dataBsToggleAttr }}="collapse"
{{ dataBsTargetAttr }}="#searchCollapse"
aria-expanded="false"
aria-controls="searchCollapse"
aria-label="{{ "header.searchButton"|trans|striptags }}">
{% sw_icon 'x' %}
</button>
<form action="{{ path('frontend.search.page') }}"
method="get"
data-search-form="true"
data-search-widget-options='{{ searchWidgetOptions|json_encode }}'
data-url="{{ path('frontend.search.suggest') }}?search="
class="search-form mx-md-3">
<div class="input-group">
{% block layout_header_search_input %}
<input type="search"
name="search"
class="form-control col-8"
autocomplete="off"
autocapitalize="off"
placeholder="{{ "header.searchPlaceholder"|trans|striptags }}"
aria-label="{{ "header.searchPlaceholder"|trans|striptags }}"
value="{{ page.searchTerm }}"
>
{% endblock %}
{% block layout_header_search_button %}
{% if feature('v6.5.0.0') %}
<button type="submit"
class="btn btn-primary py-1 px-0 col-4"
aria-label="{{ "header.searchButton"|trans|striptags }}">
<span>
{{ "header.searchButton"|trans|striptags }}
</span>
</button>
{% else %}
<button type="submit"
class="btn btn-primary py-1 px-0 col-4"
aria-label="{{ "header.searchButton"|trans|striptags }}">
<span>
{{ "header.searchButton"|trans|striptags }}
</span>
</button>
{% endif %}
{% endblock %}
</div>
</form>
</div>
{% endblock %}