#ifndef CHROME_BROWSER_EXTENSIONS_API_TAB_GROUPS_TAB_GROUPS_UTIL_H_
#define CHROME_BROWSER_EXTENSIONS_API_TAB_GROUPS_TAB_GROUPS_UTIL_H_
#include <optional>
#include <string>
#include "chrome/common/extensions/api/tab_groups.h"
#include "components/tab_groups/tab_group_color.h"
class Browser;
namespace content {
class BrowserContext;
}
class TabStripModel;
namespace tab_groups {
class TabGroupId;
class TabGroupVisualData;
}
namespace extensions {
namespace tab_groups_util {
int GetGroupId(const tab_groups::TabGroupId& id);
int GetWindowIdOfGroup(const tab_groups::TabGroupId& id);
api::tab_groups::TabGroup CreateTabGroupObject(
const tab_groups::TabGroupId& id,
const tab_groups::TabGroupVisualData& visual_data);
std::optional<api::tab_groups::TabGroup> CreateTabGroupObject(
const tab_groups::TabGroupId& id);
bool GetGroupById(int group_id,
content::BrowserContext* browser_context,
bool include_incognito,
Browser** browser,
tab_groups::TabGroupId* id,
const tab_groups::TabGroupVisualData** visual_data,
std::string* error);
bool GetGroupById(int group_id,
content::BrowserContext* browser_context,
bool include_incognito,
tab_groups::TabGroupId* id,
std::string* error);
api::tab_groups::Color ColorIdToColor(
const tab_groups::TabGroupColorId& color_id);
tab_groups::TabGroupColorId ColorToColorId(api::tab_groups::Color color);
bool IsGroupSaved(tab_groups::TabGroupId tab_group_id,
TabStripModel* tab_strip_model);
}
}
#endif