using Microsoft.AspNetCore.Components;
namespace AIStudio.Components;
public partial class ConfigurationText : ConfigurationBase
{
///
/// The text used for the textfield.
///
[Parameter]
public Func Text { get; set; } = () => string.Empty;
///
/// An action which is called when the option is changed.
///
[Parameter]
public Action TextUpdate { get; set; } = _ => { };
///
/// The icon to display next to the textfield.
///
[Parameter]
public string Icon { get; set; } = Icons.Material.Filled.Info;
///
/// The color of the icon to use.
///
[Parameter]
public Color IconColor { get; set; } = Color.Default;
private async Task OptionChanged(string updatedText)
{
this.TextUpdate(updatedText);
await this.SettingsManager.StoreSettings();
await this.InformAboutChange();
}
}