2024-09-09 13:08:16 +00:00
|
|
|
using AIStudio.Settings;
|
|
|
|
|
|
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
|
|
|
|
namespace AIStudio.Components;
|
|
|
|
|
2025-04-27 07:03:42 +00:00
|
|
|
public partial class ProfileFormSelection : MSGComponentBase
|
2024-09-09 13:08:16 +00:00
|
|
|
{
|
|
|
|
[Parameter]
|
|
|
|
public Profile Profile { get; set; } = Profile.NO_PROFILE;
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public EventCallback<Profile> ProfileChanged { get; set; }
|
|
|
|
|
|
|
|
[Parameter]
|
|
|
|
public Func<Profile, string?> Validation { get; set; } = _ => null;
|
|
|
|
|
|
|
|
private async Task SelectionChanged(Profile profile)
|
|
|
|
{
|
|
|
|
this.Profile = profile;
|
|
|
|
await this.ProfileChanged.InvokeAsync(profile);
|
|
|
|
}
|
|
|
|
}
|