= form_with url: admin_products_path, id: "filters", method: :get, data: { "search-target": "form", 'turbo-frame': "_self" } do
  = hidden_field_tag :page, nil, class: "page"
  = hidden_field_tag :per_page, nil, class: "per-page"

  .query
    .search-input
      = text_field_tag :search_term, search_term, placeholder: t('.search_products')
  - if producer_options.many?
    .producers
      = label_tag :producer_id, t('.producers.label')
      = select_tag :producer_id, options_for_select(producer_options, producer_id),
        include_blank: t('.all_producers'), class: "fullwidth",
        data: { "controller": "tom-select", 'tom-select-placeholder-value': t('.search_for_producers')}
  .categories
    = label_tag :category_id, t('.categories.label')
    = select_tag :category_id, options_for_select(category_options, category_id),
      include_blank: t('.all_categories'), class: "fullwidth",
      data: { "controller": "tom-select", 'tom-select-placeholder-value': t('.search_for_categories')}
  .submit
    .search-button
      = button_tag t(".search"), class: "secondary icon-search relaxed", name: nil
