% search_target = local_assigns[:search_target].presence || search_path %>
<% search_base_index = local_assigns[:search_base_index].presence || ENV['ALGOLIA_BASE_INDEX'] %>
<% www_search_index = local_assigns[:www_search_index].presence || 'www_page_idx' %>
<% devcenter_search_index = local_assigns[:devcenter_search_index].presence || 'dev_center_article_idx' %>
<% elements_search_index = local_assigns[:elements_search_index].presence || 'elements_resource_idx' %>
<% blog_search_index = local_assigns[:blog_search_index].presence || 'blog_post_idx' %>
<%= form_tag search_target, method: :get, id: 'search-form' do %>
<%= text_field_tag :q, params[:q], class: 'form-control', id: 'search-input', autocomplete: 'off', autofocus: true %>
<%= submit_tag 'Submit search', class: 'search-submit' %>
<% end %>
<%= hidden_field_tag :search_app_id, ENV['ALGOLIA_APP_ID'], id: 'search-app-id' %>
<%= hidden_field_tag :search_api_key, ENV['ALGOLIA_SEARCH_API_KEY'], id: 'search-api-key' %>
<%= hidden_field_tag :search_base_index, search_base_index, id: 'search-base-index' %>
<%= yield if block_given? %>
<% if ENV['SEARCH_BASE_INDEX_ONLY'].nil? || ENV['SEARCH_BASE_INDEX_ONLY'].to_s == 'false' %>
<% end %>