#pragma once

#include <filesystem>
#include <string>
#include <string_view>

namespace nebula::ui {

// Process-wide profile used to isolate desktop vs Big Picture CEF data.
// Call before GetUserDataDirectory() / CEF initialize. Empty/"desktop" = default.
void SetAppProfile(std::string_view profile);
const std::string& GetAppProfile();

std::filesystem::path GetExecutableDirectory();
std::filesystem::path GetUserDataDirectory();
std::filesystem::path GetCacheDirectory();
std::filesystem::path GetExtensionsDirectory();
std::filesystem::path GetExtensionsStatePath();
std::filesystem::path GetSessionStatePath();
std::filesystem::path GetFirstRunStatePath();
std::filesystem::path GetUiPagePath(const std::string& page_name);
std::string FilePathToUrl(std::filesystem::path path);
std::string GetChromeUrl();
std::string GetHomeUrl();
std::string GetSetupUrl();
std::string GetSettingsUrl();
std::string GetDownloadsUrl();
std::string GetBigPictureUrl();
std::string GetGpuDiagnosticsUrl();
std::string GetMenuPopupUrl();
std::string GetInsecureWarningUrl(const std::string& target_url);
std::string GetNotFoundUrl(const std::string& target_url);
std::string ResolveInternalUrl(const std::string& url);
std::string ToInternalUrl(const std::string& url);

bool IsInternalHomeUrl(const std::string& url);
bool IsNebulaInternalUrl(const std::string& url);
bool IsHttpUrl(const std::string& url);
bool IsChromiumNewTabUrl(const std::string& url);
bool IsEmptyOrChromiumNewTabUrl(const std::string& url);

}  // namespace nebula::ui
