#ifndef CHROME_BROWSER_UI_LENS_LENS_OVERLAY_URL_BUILDER_H_
#define CHROME_BROWSER_UI_LENS_LENS_OVERLAY_URL_BUILDER_H_
#include <optional>
#include <string>
#include "chrome/browser/ui/lens/lens_overlay_invocation_source.h"
#include "third_party/lens_server_proto/lens_overlay_cluster_info.pb.h"
#include "third_party/lens_server_proto/lens_overlay_request_id.pb.h"
#include "url/gurl.h"
namespace lens {
enum class TextOnlyQueryType { … };
void AppendTranslateParamsToMap(std::map<std::string, std::string>& params,
const std::string& query,
const std::string& content_language);
GURL AppendCommonSearchParametersToURL(const GURL& url_to_modify,
bool use_dark_mode);
GURL AppendSearchContextParamToURL(const GURL& url_to_modify,
std::optional<GURL> page_url,
std::optional<std::string> page_title);
GURL AppendDarkModeParamToURL(const GURL& url_to_modify, bool use_dark_mode);
GURL AppendInvocationSourceParamToURL(
const GURL& url_to_modify,
lens::LensOverlayInvocationSource invocation_source);
GURL BuildTextOnlySearchURL(
const std::string& text_query,
std::optional<GURL> page_url,
std::optional<std::string> page_title,
std::map<std::string, std::string> additional_search_query_params,
lens::LensOverlayInvocationSource invocation_source,
TextOnlyQueryType text_only_query_type,
bool use_dark_mode);
GURL BuildLensSearchURL(
std::optional<std::string> text_query,
std::optional<GURL> page_url,
std::optional<std::string> page_title,
std::unique_ptr<lens::LensOverlayRequestId> request_id,
lens::LensOverlayClusterInfo cluster_info,
std::map<std::string, std::string> additional_search_query_params,
lens::LensOverlayInvocationSource invocation_source,
bool use_dark_mode);
const std::string GetTextQueryParameterValue(const GURL& url);
const std::string GetLensModeParameterValue(const GURL& url);
bool HasCommonSearchQueryParameters(const GURL& url);
bool IsValidSearchResultsUrl(const GURL& url);
GURL GetSearchResultsUrlFromRedirectUrl(const GURL& url);
GURL RemoveIgnoredSearchURLParameters(const GURL& url);
}
#endif