2024-08-05 19:12:52 +00:00
|
|
|
@using AIStudio.Settings
|
2025-04-27 07:06:05 +00:00
|
|
|
@inherits MSGComponentBase
|
2026-09-16 11:02:56 +00:00
|
|
|
@{
|
|
|
|
|
var availableProviderItems = this.GetAvailableProviderSelectionItems().ToList();
|
|
|
|
|
}
|
2026-08-25 10:46:10 +00:00
|
|
|
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Margin="Margin.Dense" Label="@T("Provider")" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined" Disabled="@this.Disabled">
|
2026-09-16 11:02:56 +00:00
|
|
|
@foreach (var providerItem in availableProviderItems)
|
2024-08-05 19:12:52 +00:00
|
|
|
{
|
2026-07-04 16:28:52 +00:00
|
|
|
<MudSelectItem Value="@providerItem.Provider">
|
|
|
|
|
<MudStack Row="true" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween" Class="w-100" Wrap="Wrap.NoWrap">
|
2026-08-25 10:46:10 +00:00
|
|
|
<ProviderLabel ProviderSettings="@providerItem.Provider" Text="@providerItem.Provider.ToString()" TextClass="me-2" />
|
2026-07-04 16:28:52 +00:00
|
|
|
@if (providerItem.CapabilityIcons.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1" Wrap="Wrap.NoWrap" Class="flex-grow-0">
|
|
|
|
|
@foreach (var capabilityIcon in providerItem.CapabilityIcons)
|
|
|
|
|
{
|
|
|
|
|
<MudTooltip Text="@capabilityIcon.Tooltip">
|
|
|
|
|
<MudIcon Icon="@capabilityIcon.Icon" Size="Size.Small" Color="Color.Default" />
|
|
|
|
|
</MudTooltip>
|
|
|
|
|
}
|
|
|
|
|
</MudStack>
|
|
|
|
|
}
|
|
|
|
|
</MudStack>
|
|
|
|
|
</MudSelectItem>
|
2024-08-05 19:12:52 +00:00
|
|
|
}
|
2026-09-16 11:02:56 +00:00
|
|
|
</MudSelect>
|
|
|
|
|
@if (availableProviderItems.Count is 0 && this.GetEmptySelectionHint() is { } emptySelectionHint)
|
|
|
|
|
{
|
|
|
|
|
<MudText Typo="Typo.body2" Color="Color.Error" Class="mb-3">
|
|
|
|
|
@emptySelectionHint
|
|
|
|
|
</MudText>
|
|
|
|
|
}
|