using AIStudio.Provider;
using AIStudio.Tools.PluginSystem;
namespace AIStudio.Dialogs.Settings;
///
/// Provides the code-behind type for the settings of the BeyondFacts Lab.
///
public partial class SettingsDialogBeyondFactsLab : SettingsDialogBase
{
///
/// Whether the language of the app tells a formal address from an informal one, so that the form of address
/// is a choice at all.
///
private bool offersFormOfAddress;
///
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
this.offersFormOfAddress = (await this.SettingsManager.GetActiveLanguagePlugin()).HasInformalAddress();
}
///
/// Shows the minimum confidence which applies, never one below the floor of the lab.
///
///
/// A value below the floor, e.g., from a configuration plugin, has no effect, and the list does not
/// offer it either. Showing the floor instead tells what really counts.
///
private ConfidenceLevel SelectedMinimumConfidence() => Tools.Components.BEYOND_FACTS_LAB_ASSISTANT.MinimumConfidence(this.SettingsManager);
}