def search_path_by_state_link(state)
      path = search_path_by(resource_type: params.dig(:filter, :resource_type), space_state: state)
      is_active = params.dig(:filter, :space_state).to_s == state.to_s

      link_to path, class: "order-by__tab#{" is-active" if is_active}" do
        content_tag(:strong, t(state || :all, scope: "decidim.searches.filters.state"))
      end
    end
def search_path_by_state_link(state)
      path = search_path_by(resource_type: params.dig(:filter, :resource_type), space_state: state)
      is_active = params.dig(:filter, :space_state).to_s == state.to_s

      link_to path, class: "order-by__tab#{" is-active" if is_active}" do
        content_tag(:strong, t(state || :all, scope: "decidim.searches.filters.state"))
      end
    end
Generates the path and link to filter by space state, taking into account
 the other filters applied.