Opt-in DSL to expose module config form attributes to window.DecidimToggle. To add this in your form, you need to add the following:
window.DecidimToggle
include Decidim::Toggle::ExposeAttributesToJs expose_to_javascript :enabled, :search_bar