using AIStudio.Settings;
using ComponentKind = AIStudio.Tools.Components;
namespace AIStudio.Assistants.ModelComparison;
///
/// Decides whether the pages of the Model Comparison assistant may be opened.
///
///
/// An organization can hide the assistant like any other. The tile asks the same question; the pages which do not
/// inherit AssistantBase ask here, because somebody might reach them without the tile, e.g., from a link or the
/// browser history.
///
public static class ModelComparisonAccess
{
///
/// Checks whether the Model Comparison assistant may be opened with the given settings.
///
/// The settings to check.
/// The name of the assistant for the log; without one, nothing gets logged.
/// True, when no configuration hides the assistant.
public static bool CanOpen(SettingsManager settingsManager, string assistantName = "") => settingsManager.IsAssistantVisible(ComponentKind.MODEL_COMPARISON_ASSISTANT, assistantName: assistantName);
}