<script type="application/javascript">
    (function () {
        new MonsieurBizInstantSearch({
            searchInputSelector: '#monsieurbiz_searchplugin_search_query',
            resultClosestSelector: '.autocomplete-search',
            resultFindSelector: '.autocomplete-results',
            debounceThreshold: 300,
            instantSearchUrl: '{{ path('monsieurbiz_sylius_search_instant') | escape('js') }}',
            resultContainerBottomOffset: 20,
        });

        new MonsieurBizAutoSearch({
            formSelector: 'form[name="filters-form"]',
            submitSelector: 'button[type="submit"]',
            filterSelector: 'input[type="checkbox"]',
            textFilterSelector: 'input[type="number"]',
            debounceThreshold: 600,
        });
    })();
</script>
